18 aprile 2015

How to find out php.ini path?

You can create a simple file info.php where you put:



Then, if you open that file with a browser you can see the path:

 


Otherwise, you can get a full phpinfo() using the command:
php -i

And, in there, there is the php.ini file used:

$ php -i | grep 'Configuration File'

Below the screenshot:


NOTE: As you can see the paths are diffent because it's dipend on the context.

Bye
Francesco