Page 1 of 1

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

Posted: Sat Dec 10, 2005 12:32 am
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: