Bug #18336 Updated: Loop in PHP code causes crash in Apache2 instead of PHP error message
| From: | derick@php.net | Date: | Sun, 14 Jul 2002 09:42:10 +0000 |
| Subject: | Bug #18336 Updated: Loop in PHP code causes crash in Apache2 instead of PHP error message | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14128@lists.php.net to get a copy of this message | ||
ID: 18336
Updated by: derick@php.net
Reported By: peter@helpnet.com.au
-Status: Open
+Status: Won't fix
Bug Type: Reproducible crash
Operating System: Windows NT
PHP Version: 4.2.1
New Comment:
PHP can not guard for these mistakes as discussed on a few occasions on
the PHP Developers mailing list.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-07-14 05:40:10] peter@helpnet.com.au
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