GrahamWong Posted January 9, 2008 Share Posted January 9, 2008 Hi, Does anyone else have this problem? As soon as I copy php.ini-recommended to c:\windows\php.ini and restart IIS. I run a page with phpinfo(); and all I get is a white blank page. Nothing works, not even: echo 'test'; But when I delete c:\windows\php.ini and restart again, everything works fine, only no config loaded so no extensions. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/85128-solved-php-stops-working-when-i-use-phpini-recommended-but-not-phpini-dist-win2003/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 9, 2008 Share Posted January 9, 2008 Check your web server log for errors. On IIS I believe the system event logs is used to log IIS/php errors. Quote Link to comment https://forums.phpfreaks.com/topic/85128-solved-php-stops-working-when-i-use-phpini-recommended-but-not-phpini-dist-win2003/#findComment-434283 Share on other sites More sharing options...
GrahamWong Posted January 9, 2008 Author Share Posted January 9, 2008 This is the contents of my IIS6 log file for the site: #Software: Microsoft Internet Information Services 6.0 #Version: 1.0 #Date: 2008-01-09 05:58:51 #Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status 2008-01-09 05:58:51 W3SVC322114385 10.20.1.135 GET /phpinfo.php - 80 - 59.167.170.180 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.1.11)+Gecko/20071127+Firefox/2.0.0.11 200 0 0 Quote Link to comment https://forums.phpfreaks.com/topic/85128-solved-php-stops-working-when-i-use-phpini-recommended-but-not-phpini-dist-win2003/#findComment-434338 Share on other sites More sharing options...
GrahamWong Posted January 9, 2008 Author Share Posted January 9, 2008 Ok found the problem. It was the line: short_open_tag = Off in php.ini, just had to set it to On. Quote Link to comment https://forums.phpfreaks.com/topic/85128-solved-php-stops-working-when-i-use-phpini-recommended-but-not-phpini-dist-win2003/#findComment-434343 Share on other sites More sharing options...
PFMaBiSmAd Posted January 9, 2008 Share Posted January 9, 2008 You should write php code using full opening tags <?php, especially if you expect to write code professionally where the code could be distributed and run on other servers. Not everyone can turn on short open tags on their server (On IIS the only way is changing the php.ini setting and on shared hosting using IIS it cannot be done.) The short open tag <? and the short open print tag <?= were lazy way short cuts that result in code that is not portable between servers. It is also a problem when using XML inside a .php file, partly because the php parser was never made smart enough to know that <?XML is not a short open tag. Quote Link to comment https://forums.phpfreaks.com/topic/85128-solved-php-stops-working-when-i-use-phpini-recommended-but-not-phpini-dist-win2003/#findComment-434488 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.