ID: 33339
User updated by: webmaster at gleitgeb dot at
Reported By: webmaster at gleitgeb dot at
Status: Bogus
Bug Type: Apache2 related
Operating System: Windows 2000 SP4
PHP Version: 5.0.4
New Comment:
Yes sure I know
... but it isn't a good solution to let Apache crash to end a endless
loop isn't it?
There must be a better solution to prevent such problems .. like
Stack-overflow or something like that.
Or if the maximum-execution time is reached the loop ends ..
I cannot check every users scripts if they have endless loops in it.
Previous Comments:
------------------------------------------------------------------------
[2005-06-15 09:47:26] [EMAIL PROTECTED]
That's because with typo you end up with endless loop.
The very same result you'll get with this code: <?php function f() {
$x=1; f(); } f(); ?>
------------------------------------------------------------------------
[2005-06-14 19:22:38] webmaster at gleitgeb dot at
Replacing $GLOBAL with $GLOBALS doesn't end with a crash of Apache2!!!
------------------------------------------------------------------------
[2005-06-14 19:20:29] webmaster at gleitgeb dot at
That doesn't help ... I already tried the latest snapshot yesterday.
And I only copied the source from a script of one member of my
webserver.
I didn't change anything.
I tried again now.
Now I get following Errorlogentry:
[Tue Jun 14 19:18:48 2005] [notice] Parent: child process exited with
status 1073807364 -- Restarting.
But it's still crashing.
------------------------------------------------------------------------
[2005-06-14 15:29:41] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
I can not reproduce (and your script has a typo: $GLOBAL should be
$GLOBALS ?)
------------------------------------------------------------------------
[2005-06-14 15:22:10] webmaster at gleitgeb dot at
Description:
------------
I tested on 2 Systems:
Both Windows 2000 Professional SP4
Apache 2.0.54
PHP 5.0.4
With the following code below Apache crashes reproducibly
Depending Apache-Errorlog-entrys:
[Mon Jun 13 23:32:42 2005] [notice] Apache/2.0.54 (Win32) DAV/2
PHP/5.0.5-dev mod_jk/1.2.8 configured -- resuming normal operations
[Mon Jun 13 23:32:42 2005] [notice] Server built: Apr 16 2005 14:25:31
[Mon Jun 13 23:32:42 2005] [notice] Parent: Created child process 4116
[Mon Jun 13 23:32:42 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Mon Jun 13 23:32:43 2005] [notice] Child 4116: Child process is
running
[Mon Jun 13 23:32:43 2005] [notice] Child 4116: Acquired the start
mutex.
[Mon Jun 13 23:32:43 2005] [notice] Child 4116: Starting 250 worker
threads.
[Mon Jun 13 23:32:43 2005] [notice] Child 4116: Listening on port 80.
>>>>[Tue Jun 14 00:29:46 2005] [notice] Parent: child process exited
with status 3221225477 -- Restarting.
[Tue Jun 14 00:29:47 2005] [notice] Apache/2.0.54 (Win32) DAV/2
PHP/5.0.5-dev mod_jk/1.2.8 configured -- resuming normal operations
[Tue Jun 14 00:29:47 2005] [notice] Server built: Apr 16 2005 14:25:31
[Tue Jun 14 00:29:47 2005] [notice] Parent: Created child process 4220
[Tue Jun 14 00:29:48 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Tue Jun 14 00:29:49 2005] [notice] Child 4220: Child process is
running
[Tue Jun 14 00:29:49 2005] [notice] Child 4220: Acquired the start
mutex.
[Tue Jun 14 00:29:49 2005] [notice] Child 4220: Starting 250 worker
threads.
[Tue Jun 14 00:29:49 2005] [notice] Child 4220: Listening on port 80.
I have register_globals=On.
But otherwise nothing special.
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll
Reproduce code:
---------------
<?php
$GLOBAL['x'] =0;
function schreibe() {
print "
<table border=\"2\"><tr><td>blah";
if($GLOBAL['x'] < 10) { $GLOBAL['x']++; schreibe(); }
print "
</td></tr></table>"; }
schreibe();
?>
Expected result:
----------------
Script should stop after some time
Actual result:
--------------
Apache2 crashes
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33339&edit=1