How to find where my PHP.ini file is installed in any Linux based OS

PROBLEM  :

There are so many versions of Linux that are being used as server and every version has a different folder structure. If you are new to some Linux how can you find where your php.ini file is ?

SOLUTION:

Open your terminal/console  ( In windows you need Putty to connect to the server )

ssh user@ip
php -i | grep "Loaded Configuration File"

This will show you the path in the following format Loaded Configuration File => /etc/php.ini.

where  /etc/php.ini is the path in the system we tried. This might vary from system to system.

Add a Comment

Your email address will not be published. Required fields are marked *