PHP.INI location

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
jgt
Forum Newbie
Posts: 12
Joined: Thu Nov 02, 2006 6:07 am

PHP.INI location

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP.INI location

Post by Christopher »

You can set the base PHP directory in the Apache httpd.conf file. See the installation instructions in the manual.
(#10850)
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: PHP.INI location

Post 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.
jgt
Forum Newbie
Posts: 12
Joined: Thu Nov 02, 2006 6:07 am

Re: PHP.INI location

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