|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-12-16 03:24 UTC] alain at cscoms dot net
I have max_execution_time set to 30 and safe_mode set to On in php.ini. The phpinfo() page shows them as such.
When PHP 4.3.0RC3 is compiled as a module for Apache 2.0.43, a script that loops is never stopped e.g.:
loop.php:
cat loop.php
<?
while ( 1 ) {
}
?>
will loop forever. I have tested that max_execution_time value is correct by having a script use ini_get to get it and display it.
PHP configured as:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local --enable-memory-limit=yes --enable-track-vars --enable-debug=no --enable-sockets
Apache configured as:
CFLAGS="-DFD_SETSIZE=8128" ./configure --enable-so --enable-ssl --enable-include --enable-cgi --enable-rewrite --enable-status --enable-expires --enable-info --with-egd=/var/run/egd-pool --with-mpm=worker
More checks done:
PHP 4.3.0RC3 configured for Apache 1.3.26 static works normally.
Same, with Apache 2.0.43 configured to use prefork (non-threaded) model instead of worker: works also.
So it seems to be related to the Apache 2 threaded stuff.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 11:00:02 2025 UTC |
Just tried with php4-200212160830 (4.4.0-dev): same, the script never exits. I'm compiling this on Solaris 2.7/SPARC and FreeBSD 4.5 to see how much O/S & platform specific this problem is. I've added a zend_printf("zend_timeout<BR>\n"); to zend_timeout() (Zend/zend_execute_API.c). I can see the message in the browser when timeout works (like when running in Apache 1.3) but not when it doesn't (although my loop.php script now exits after a huge for loop so that I can see the page output). So I presume that the signal triggered by setittimer in zend_set_timeout() is never delivered. Thanks for the impressively fast reply!