Page 1 of 1

How to make IIS5.1 read the new php.ini?

Posted: Fri Aug 03, 2007 4:06 am
by dislimit
I'm installing a forum system named "discuz!" in my local server, based on:
WinXp, IIS5.1, php5.2.3, MySQL5, Zend Optimizer 3.2.6.

I installed the server software one by one in the above order. The php5 should be installed
properly coz I used Windows installer, and checked the dll list of IIS after installing,
PHP was there. I also put it into the filter list. The status of the filter is green after I
restart the server.

Then when I run the install.php script from the browser, it prompts (with a message
in the displayed php page) that I need to set the "short_open_tag" to "On"
in order to install the forum. So I edited the php.ini in the directory that I installed php5, and

Refresh the page-- same prompt;
Restart the IIS web server-- same prompt;
Restart the computer-- same prompt;
Reinstall Zend Optimizer (with proper path to new php.ini and my website)-- same prompt;

It seems that the Web server hasn't read the new php.ini.
What to do?

Posted: Fri Aug 03, 2007 8:49 am
by dislimit
Just tried to put in C:\windows\ and C:\windows\system32\
and restarted IIS Web server.
But the prompt remains....

Posted: Fri Aug 03, 2007 8:58 am
by iknownothing
in your editor:

Replace All: <? with <?php (but not <?xml if there is any...)

trouble gone...

Alternatively..

Add this to the start of your index.php

Code: Select all

ini_set("short_open_tag","1");
But option 1 is better. Many people on here with protest that you should always use <?php over <?, and this is a perfect example why...

Posted: Sat Aug 04, 2007 8:19 am
by feyd
Never ever ever turn on short_open_tag.