laurin1
asked on
PHP on IIS - PHP Not Loading Correct php.in File
I've built many PHP servers and I can't figure out what I'm doing wrong with this new one. I've got two very similar servers, the only difference is the old one is a Domain Controller. Both are Windows 2003 Service Pack 2, with IIS 6, running PHP 5 (new one is 5.25, old one is 5.23, which I can't imagine is the issue.)
The new server will not see my php.ini file, unless it is in the c:\Windows directory. When it's in the c:\PHP directory, the file is not loaded (ignored.) PHP starts with no .ini file at all.
This is a very standard, default configuration. I've just recently built this server.
The new server will not see my php.ini file, unless it is in the c:\Windows directory. When it's in the c:\PHP directory, the file is not loaded (ignored.) PHP starts with no .ini file at all.
This is a very standard, default configuration. I've just recently built this server.
ASKER
No, it's not better to have it there. PHP recommends you put in in the PHP directory, which is where I have it on the other server and it works just fine. C:\PHP is in the path, so it doens't have to specifically look in c:\PHP, it just looks in the path.
what mode are you running in? ISAPI or CGI?
have you given the php.ini file read writes by IUSER?
have you given the php.ini file read writes by IUSER?
fyi...
Basically it seems that the ISAPI module will look in the path set in PHPRC first, and choose the php-isapi.ini file. The CGI module will look in PHPRC first too, but it upon seeing no php.ini it will then move on to search it's own directory, where it finds php.ini.
Basically it seems that the ISAPI module will look in the path set in PHPRC first, and choose the php-isapi.ini file. The CGI module will look in PHPRC first too, but it upon seeing no php.ini it will then move on to search it's own directory, where it finds php.ini.
ASKER
ISAPI, and yea, i've tried giving IUSR read perms and doen't help, plus on the working server, IUSR hasn't been given those rights and it works fine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
nice, i am going to keep this as future ref just in case :)
what is the problem of having php.ini in c:\windows? its better there than the default php install dir.