Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP Shorthands are not working ...

Posted on 2011-02-13
7
Medium Priority
?
314 Views
Last Modified: 2012-05-11
Hi Guys,

I'm trying to include a php file within include file...  its not working....
the page shows blank.. (empty) no errors, no warnings
and when i upload my site on other hosting (Linux) server its working properly.
can u explain what was the problem...? and why this kind of behavior.

I'm using 1and1 VPS server (CentOS release 5.2)

Please advice, what is the problem or where I'm doing any thing wrong or how to fix ... :-(

Thanks in advance.
0
Comment
Question by:el123
7 Comments
 
LVL 4

Expert Comment

by:JayDiablo
ID: 34884900
Do you have access to the server's http error log?

You may want to check there for errors.  Most default PHP installations have errors set to not display, but will still log (as they should be).
0
 

Author Comment

by:el123
ID: 34885047
yes I've access to linux server ... what to look and where to look? please guide, thanks.
0
 
LVL 16

Accepted Solution

by:
jessc7 earned 1332 total points
ID: 34885136
Look for the "short_open_tag" directive in your php.ini. Change it to a value of "1" to turn it on. You may need to restart Apache.

http://www.php.net/manual/en/ini.core.php.

http://www.tomjepson.co.uk/tutorials/35/enabling-short-tags-in-php.html
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 16

Expert Comment

by:jessc7
ID: 34885147
Here is a tip on finding your php.ini:

http://www.geeklog.net/faqman/index.php?op=view&t=53
0
 
LVL 16

Assisted Solution

by:jessc7
jessc7 earned 1332 total points
ID: 34885154
If you want to display errors without changing your php.ini file, use the following to override in the page scope:

<?php
ini_set('display_errors', 1);
?>
0
 
LVL 11

Expert Comment

by:mattibutt
ID: 34886106
Hi
I use the 1an1 server with centos are you using plesk if you are then enable php short tag it worked fine as far I remember I didn't have to change anything
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 668 total points
ID: 34888081
Add this to the top of all the scripts that are involved in the process.  Then run it again and tell us what output you received.
<?php
ini_set('display_errors', TRUE);
error_reporting(E_ALL);

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question