ID: 18336 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Won't fix Bug Type: Reproducible crash Operating System: Windows NT PHP Version: 4.2.1 New Comment:
apache/1.3.23, winnt, php/4.1.2 (or maybe 4.1.3-dev??): when calling a function recursive (infinite loop), the apache child will be shut down with an windows' dr.watson error message 'stack overflow in apache.exe'. in apache error log it will be noticed. Previous Comments: ------------------------------------------------------------------------ [2002-07-14 05:42:09] [EMAIL PROTECTED] PHP can not guard for these mistakes as discussed on a few occasions on the PHP Developers mailing list. Derick ------------------------------------------------------------------------ [2002-07-14 05:40:10] [EMAIL PROTECTED] I wrote a function that called itself occasionally. When I accidentally changed the selection criteria the wrong way, the function went in to a loop calling itself. Instead of getting a PHP error message, Apache2 crashed with: Apache.exe Exception stack overflow(oxc000000fd), Address: 0x00801366 There were no error messages in any logs, Apache, NT, or PHP. At first I thought it an Apache error as I upgraded to Apache 2 with the release of Apache 2.0.35 and PHP 4.2.0. That combination produced occasional random errors on some new extensions, including DOMXML, but nothing I needed for a production environment. An upgrade to PHP 4.2.1 made matters worse as it made every test site crash. An upgrade to Apache 2.0.39 did nothing to help PHP's problems. I tried php4-win32-latest.zip today, 2002-07-14, but it crashed Apache on start up. (Apache worked with everything non PHP.) php4-win32-STABLE-latest.zip solved the start up crash and solved the crashes with the other test sites. Back to the code that induced the first problem. I had just turned sessions on in the test site and thought the PHP session code had failed under Apache but most of the other sites were running happily with PHP 4.2.0 sessions under Apache2. Eventually I discovered the exact line causing the problem. In the past when I created an infinite loop in PHP, it either produced a PHP time out message or a PHP memory limit error. Because I have hundreds of Mb available and set php.ini's memory usage to many times the default, tiny test programs rarely run out of memory before timing out. Under PHP 4.2.0 onwards and Apache 2, the result is an Apache crash instead of a PHP error. The Apache 2 httpd.conf contains the defaults for all process related settings. php.ini contains the defaults except for an increase in the memory allocation to 30 Mb and changing error reporting to report all errors. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18336&edit=1