views:

140

answers:

4

I have a feeling that Apache is using a different php.ini file that the one I am editing. I make a change in my php.ini file, restart Apache, and the change doesn't take affect. So I don't know what to do anymore.

Any ideas?

Update: Found out it's using the right php.ini file...but I still don't know what to do!

+5  A: 

To find the file that's being run by PHP, create a phpinfo file (just <?php phpinfo();?>) and look for the 'Configuration File (php.ini) Path' directive.

Sean
+2  A: 

The output from phpinfo() will contain this. When using PHP as an Apache module, it can be configured using PHPIniDir in httpd.conf (or similar).

Rob
A: 

Question for you, what platform are you running on unix or windows? If it is unix based, check if your php.ini is residing in the same directory as /etc/httpd. Again, installation of apache can vary so check...or issue the command "find / -name php.ini -print" (without quotes) to see which one is it you are using

Ok. Since you said you have found the correct php.ini, sounds like something is missing when you edited the php.ini and reloaded apache. Look in the log directory /var/log/httpd for error_log and check to see if there was errors...that would be a start!

tommieb75
nothing called httpd in /var/log...maybe not a Snow Leopard place to look?
Andrew
Hmmm...you are running Snow Leopard (I am not familiar with it but can guess it is similar to freebsd variant)...it would be worth your while to dig around in /var/log and see where the log file is kept...or even better check in the httpd.conf (the configuration file for apache) to see where the actual log file is stored into...
tommieb75
A: 

from the command line, run

php -i |grep "php.ini"

This will describe the location php is loading its ini file from. You can reconfigure the php.ini location by recompiling php.

Zak