I've installed PHP 4.4.2 on Win2003 Server as an ISAPI module. When I run phpinfo(), it's showing the Configuration File (php.ini) Path is C:\WINDOWS. There is no php.ini file in that directory. So, I don't know where it's getting these settings. I've added "C:\php" to the system PATH. I've given Web User permissions to the C:\php folder. I've done everything according to the instructions. Not to mention, that I've installed PHP on other Win2003 Servers before, and I've never experienced this problem. I just can't figure it out. Any ideas? Maybe it's this new version?
Thanks in advance, Swede.
PHP is not reading php.ini file
Moderator: General Moderators
I forgot to mention that I tried placing it in C:\Windows, and it still was using default settings that must be built into PHP. I've searched the HD, and there are no other php.ini files. At this point, I don't want to move to 5 because I have no problems with 4, and I just don't want the headache of testing for broken code.
Version 4.4.2 was reales last Friday. I think I'll try an older version and see what happens.
Version 4.4.2 was reales last Friday. I think I'll try an older version and see what happens.
Older versions do the same thing. It recoginizes the version, but it keeps only looking in c:\Windows. I know the PATH is set correctly, because I can call a file in c:\php from any other directory and it works.
Now, I don't know what I've done differently. I tried using 4.4.2 again, and copying php.ini to c:\windows, and I'm getting "No input file specified" when I try to run phpinfo() in a test.php.
I'm starting to think this server has something wrong with it.
Now, I don't know what I've done differently. I tried using 4.4.2 again, and copying php.ini to c:\windows, and I'm getting "No input file specified" when I try to run phpinfo() in a test.php.
I'm starting to think this server has something wrong with it.
I believe I got it working now. I found this in some installation directions as how to get PHP to read your php.ini. It recommended going into System Properties > Environment Variables. Then add a NEW System variable, use "PHPRC" as the Variable and your php directory path as the value.
This did the trick. However, someone commented that this was a "dirty fix", and implied that it isn't secure. I only saw this negative comment once, no other sites that showed this fix mentioned any potential harm. But, if someone knows more about it, I'd appreciate some feedback.
Also, I've discovered that I don't need to give IUSR_COMPUTER permissions to either the php directory or the website directory itself. This is strange, but if it works, I'll assume this is safer.
And while I'm at it... is there any reason that I couldn't put my websites under just c:\Inetpub\ instead of c:\Inetpub\wwwroot\? And if I did this, would I want to use "C:\Inetpub" as the doc_root in php.ini. Everything seems to work even when I have doc_root set to nothing (as someone on another forum suggested).
Every other time I've installed php, I've had no problems. This installation was very unusual, and it makes me feel like something's not right.
Thanks, Swede
This did the trick. However, someone commented that this was a "dirty fix", and implied that it isn't secure. I only saw this negative comment once, no other sites that showed this fix mentioned any potential harm. But, if someone knows more about it, I'd appreciate some feedback.
Also, I've discovered that I don't need to give IUSR_COMPUTER permissions to either the php directory or the website directory itself. This is strange, but if it works, I'll assume this is safer.
And while I'm at it... is there any reason that I couldn't put my websites under just c:\Inetpub\ instead of c:\Inetpub\wwwroot\? And if I did this, would I want to use "C:\Inetpub" as the doc_root in php.ini. Everything seems to work even when I have doc_root set to nothing (as someone on another forum suggested).
Every other time I've installed php, I've had no problems. This installation was very unusual, and it makes me feel like something's not right.
Thanks, Swede