Page 1 of 1

php.ini not working with IIS

Posted: Wed Apr 11, 2007 1:28 pm
by Burrito
this is the strangest thing I've seen in a very long time. I can't even count how many times I've set up PHP on a windows box (both with apache and IIS) and I've never seen this issue.

I just tried installing on my new work machine here (with IIS) and for some reason php is not reading the php.ini file. I have checked that I only have one instance of the php.ini file on my c:\ drive and it is in the c:\windows folder. When I run phpinfo() it shows a default (standard) php load and when I uncomment a few extensions, they are not being loaded. I verfied the extension path is correct....still no go. I then tried renaming my php.ini file to php.ini-old thinking (hoping) my php would quit working. When I restarted IIS and ran phpinfo() it shows the .ini file as being c:\windows (yet php still worked). I then renamed it back to php.ini and restarted IIS and it correctly shows c:\windows\php.ini. I then replaced all of the text in my php.ini file with 'adfdasdfadf' and it still works (php).

I KNOW for a fact that in the past when I've changed stuff in php.ini that would cause it to bomb, it did just that...bombed and died a horrible death. Yet this installation for some reason seems to keep on ticking and none of the changes I'm making to php.ini are being reflected in my installation.

any ideas here?

Posted: Wed Apr 11, 2007 4:11 pm
by Burrito
I got it working. I'm really not sure how as I didn't change anything....but things are in tip-top shape now. 8O

Posted: Wed Apr 11, 2007 4:32 pm
by RobertGonzalez
Any chance of a browser cache?

Posted: Wed Apr 11, 2007 4:46 pm
by Burrito
Everah wrote:Any chance of a browser cache?
no I was ctrl-refreshing the hell out of it. I thought the same and so I stopped IIS all together and when I did that, it stopped working...I'm gonna chalk it up to voodoo or the fact that I was grossly overlooked something (which wouldn't be the first, nor will it be the last).

Posted: Wed Apr 11, 2007 4:49 pm
by feyd
Mmm.. Monday shifted to Wednesday. ;)

Posted: Wed Apr 25, 2007 11:29 am
by sanderrrrrr
I would really, really like to know how you solved this problem.
The same exact problem encounters at my server.

I found this topic with google.

Posted: Wed Apr 25, 2007 11:46 am
by Burrito
I don't know what fixed it. Best I can guess is that IIS was caching something on the server side and it finally let go after a while. It just fixed itself without my doing anything in particular to resolve it.

Steps I took:

1) moved php.ini to c:\windows
2) searched drive for all instances of php.ini
3) changed info in php.ini to garbage (php still worked)
4) deleted php.ini (php still worked)
5) unzipped new php.ini from package and tried both versions (neither worked with my changes)
6) restarted IIS between all of these steps

miraculously PHP just started working after a period of time with the changes in put in...it's voodoo I tell ya!