Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Can't find php.ini

It's not where phpinfo() says it is

4:11 pm on Feb 7, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 2, 2008
votes: 0

My phpinfo() says Loaded Configuration File is at /etc/php.ini but no file exists at that location on the server.

I have two other php.ini files though, in /etc/php5/apache2 and /etc/php5/cli.

I need to edit the php.ini but which one, and why does phpinfo() say it's somewhere it isn't?
10:10 pm on Feb 8, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 23, 2002
votes: 0

use this command to find php.ini on your server.

locate php.ini


root@skynet[~]# locate php.ini

On a Cpanel server, the one you want to edit is /usr/local/lib/php.ini