Jump to content

[SOLVED] PHP stops working when I use php.ini-recommended but not php.ini-dist (win2003)


Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.