PHP 4.0 Bug #2560: max_execution_time is not accurate
| From: | djm at web dot us dot uu dot net | Date: | Mon, 18 Oct 1999 15:48:13 +0000 |
| Subject: | PHP 4.0 Bug #2560: max_execution_time is not accurate | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11743@lists.php.net to get a copy of this message | ||
From: djm@web.us.uu.net
Operating system: BSDI BSD/OS 4.0.1
PHP version: 4.0 Beta 2
PHP Bug Type: Misbehaving function
Bug description: max_execution_time is not accurate
I'm using PHP 4.0B2 as a DSO with apache 1.3.9. In my httpd.conf I have set
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php
php_admin_flag safe_mode On
php_admin_value doc_root "/homes/www141/webtest"
php_admin_value open_basedir "/homes/www141/webtest"
php_admin_value safe_mode_exec_dir "/homes/www141/webtest/bin"
php_flag log_errors On
php_value error_log "/homes/www141/webtest/logs/php.log"
php_value max_execution_time 3
php_value memory_limit 8388608
When I run the following PHP script, it is not aborted before printing the
second message, despite having run for more than 3 seconds. And it
takes about 13-18 wall clock seconds before PHP aborts the infinite loop. Printing
phpinfo() confirms that max_execution_time is indeed set to 3.
<html><head><title>test of
max_execution_time</title></head><body>
<?
echo "before<p>\n"; sleep(10); echo "after<p>\n";
while (1) { $i++; }
?>
</body></html>
This is being run on a 450MHz server that's doing nothing else, so I don't
think CPU contention is an issue.