One way to find out the details of your PHP configuration is by saving
<?php phpinfo(); ?>
in a text file with the extension .php in a web server directory. You can name this file whatever you want; its customary name is info.php. When you visit the corresponding URI in your web browser, it will show you all the relevant details of your configuration. This method, however, leaves you vulnerable: it discloses details to the public that should be nobody’s business but the administrator’s. It is certainly not a good policy to leave the file on the server and too much hassle to create it every time it’s needed. Luckily, there is a better way.
There is no need to create an info.php file. Instead, you can issue this command in the command line:
php-fpm -i | more
The output is pretty extensive. It will show you all the relevant parameters of your PHP build (Configure Command) and current configuration, for example the PHP install location on your system:
Configuration File (php.ini) Path => /etc
If all you need it a quick info on the relevant locations, try this instead:
php --ini Configuration File (php.ini) Path: /etc Loaded Configuration File: /etc/php.ini Scan for additional .ini files in: /etc/php.d Additional .ini files parsed: (none)
That’s all there is to it.