PHP5: showing source when using "php.ini-recommended&qu

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

PHP5: showing source when using "php.ini-recommended&qu

Post by ^rooker »

[PROBLEM]
(PHP v5.1.1)
When using the "php.ini-recommended" that comes with PHP 5, it just displayed sourcecode instead of executing php files, but when using "php.ini-dist" everything works fine.


[SOLUTION]
In the recommended php.ini, the following flag is the one causing trouble with 'sloppy' code:

Code: Select all

Short_Open_Tag = Off
Set this back to "On" (as it is by default) to get things running again.

A "short open tag" is like this: "<?" compared to the completely correct "<?PHP" tag. Since a LOT of code out there simply starts with a short tag (including most of mine), this problem is likely to appear on some else's server, too. :wink:
Post Reply