PHP.ini is very useful and it is a configuration file that is used to customize behaviour of PHP at runtime. This enables easy administration in the way you administer Apache web server using configuration files. The Settings in which upload directory, register global variables, display errors, log errors, max uploading size setting, maximum time to execute a script and other configurations is written in this file.
In this article I will show how to find php.ini file location from command line.
Find php.ini File
Ever needed to make a quick adjustment to the php.ini file but you weren’t sure where it was? Here is a quick command you can use on server.
# php -i | grep php.ini
You will some output like below:
Configuration File (php.ini) Path => /etc Loaded Configuration File => /etc/php.ini