[Bug 252843] Re: hardy php5 max execution time

codeslinger codeslinger at compsalot.com
Sun Aug 10 23:04:20 BST 2008


I could not reproduce this problem.  I also checked http://bugs.php.net/
and could not find any indications of a problem with max_execution_time.

I used the following program:

#!/usr/bin/php
<?php
while(true)
{
	echo "lets test the timeout\n";
}
?>

it ran until I stopped it.

===========
Things to be aware of.   There are two different php.ini files.  If you run php from the command line you get /etc/php5/cli/php.ini    but if you run it from a web page you get  /etc/php5/apache2/php.ini    if you run it from a cgi I am not sure which config file it uses.

However, in addition to this it also loads all of the config files in
the /etc/php5/conf.d  directory, any one of which could override any
setting that is in the php.ini.

I find that relying on ini settings is not a good way to do it, instead
at the start of your program you should just do a     set_time_limit(0);

As a further consideration, the web protocol itself is not designed for
infinite time periods.  If you are trying to run a 30 minute program
from a web browser doing a page load, that is just not possible.  The
web browser itself will timeout and close the connection after about 5
minutes.



** Changed in: php5 (Ubuntu)
       Status: New => Invalid

-- 
hardy php5 max execution time
https://bugs.launchpad.net/bugs/252843
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in ubuntu.



More information about the Ubuntu-server-bugs mailing list