Trouble Finding php.ini
So I'm trying to find the php.ini script to configure the maxexecutiontime and maxinputtime settings, but I'm having trouble locating its parent directory.
Any help would be most appreciated!
4 Replies
php -i | grep php.ini
@lakridserne:
By running the following command on the command line interface (CLI), you can get the path to php.ini
php -i | grep php.ini
To anyone who might come across this thread later:
On Ubuntu, the command above will probably return /etc/php5/cli/php.ini, which is NOT the same file that is used for processing web requests. In fact, setting maxexecutiontime in cli/php.ini will not have any effect even for command-line scripts.
If you use Apache with mod_php, the relevant file is /etc/php5/apache2/php.ini.
If you use CGI or FastCGI, it's /etc/php5/cgi/php.ini.
If you use FPM, it's /etc/php5/fpm/php.ini.
If you followed some odd tutorial, it could be anywhere.