php.ini not working with IIS

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
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

php.ini not working with IIS

Post 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?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Any chance of a browser cache?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

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

Post by feyd »

Mmm.. Monday shifted to Wednesday. ;)
sanderrrrrr
Forum Newbie
Posts: 1
Joined: Wed Apr 25, 2007 11:23 am

Post 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.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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!
Post Reply