Page 1 of 1

PHP.INI location

Posted: Wed Aug 20, 2008 7:47 am
by jgt
Hello,
I recently installed a WinXP box with Apache 2.2 and PHP 5.2.6. Now I'm on configuration and tunning phase.
I've created a sample doc with phpinfo funcion inside. The result appears fine on client browser.
The result for phpinfo tells me:
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\PHP\php.ini

I've modified httpd.conf to point PHP.INI config file on C:\PHP folder. But Configuration File value is confusing me.

Does anyone knows if this is a bug on apache or php?
Is it possivle to change this value?

All other settings appears to be changed correctly so I assume system is reading correct config file.

Thanks.

Re: PHP.INI location

Posted: Wed Aug 20, 2008 1:05 pm
by Christopher
You can set the base PHP directory in the Apache httpd.conf file. See the installation instructions in the manual.

Re: PHP.INI location

Posted: Wed Aug 20, 2008 10:13 pm
by Doug G
Run phpinfo() and see where php thinks your php.ini file should be. Usually you need to put php.ini in the c:\windows directory.

Re: PHP.INI location

Posted: Thu Aug 21, 2008 4:27 am
by jgt
I have httpd.conf with parameter PHPIniDir "C:/PHP".
Also I've created an environment variable PHPRC that contains C:\PHP.
Whole box restarted (to assure all system freshness)
phpinfo() stills returning the same values
Traced file activity with FilemonNT on http starting and PHP.INI is not searched on C:\WINDOWS.
PHP is configured to run as a module.