Trouble Finding php.ini

I have an xml importing script that's timing out. I've tried calling the settimelimit() function inside the script, set to 90 secs, but it looks like it's still defaulting to 30 secs.

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

Sorry I should've also mentioned I'm running Ubuntu 11.04

By running the following command on the command line interface (CLI), you can get the path to php.ini

php -i | grep php.ini

Great. Found it. Thank you.

@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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct