How to check where Apache is looking for a php.ini file?

Viewed 91306

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 Answers

To get the php.ini file which is being used by Apache you will probably have to add phpinfo() into a .php file and open it in the browser. As php -r "phpinfo();" | grep php.ini will outout the same as php --ini would. Which php.ini is used for the CLI.

Related