Re: Re: Recursive Threading with PHP and MySQL.
| From: | Prottoss | Date: | Thu, 06 Dec 2001 00:32:38 +0000 |
| Subject: | Re: Re: Recursive Threading with PHP and MySQL. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76809@lists.php.net to get a copy of this message | ||
Recursive functions are generally a bad idea especially in php.
By using a recursive function it is possible you may "smash the stack", which
will crash an apache child (segfaults) and on a multi-threaded server take
down the whole webserver.
Even with a default memory limit of 8 megs an attacker could crash php by
accessing the same thread multiple times.
This is NOT a theoretical situation, I've actually came across it while
writing a tree drawing code for a forum. The problem exists in all the php
that I've tested (PHP 4.0.5,4.0.6,4.1.0RC5).