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

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
dislimit
Forum Newbie
Posts: 2
Joined: Fri Aug 03, 2007 3:42 am

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

Post 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?
dislimit
Forum Newbie
Posts: 2
Joined: Fri Aug 03, 2007 3:42 am

Post by dislimit »

Just tried to put in C:\windows\ and C:\windows\system32\
and restarted IIS Web server.
But the prompt remains....
User avatar
iknownothing
Forum Contributor
Posts: 337
Joined: Sun Dec 17, 2006 11:53 pm
Location: Sunshine Coast, Australia

Post 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...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Never ever ever turn on short_open_tag.
Post Reply