Re: Maximum function nesting level of '100' reached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/26/07, T. Lensselink <dev@xxxxxxxx> wrote:
>
>
> On Fri, 26 Oct 2007 14:32:42 +0200, Jochem Maas <jochem@xxxxxxxxxxxxx>
> wrote:
> > Paul Scott wrote:
> >> On Fri, 2007-10-26 at 12:52 +0200, Jochem Maas wrote:
> >>
> >>> since when is there an arbitrary maximum recursion limit???
> >>
> >> Since forever... ;)
> >
> > thats you think, personally I test this kind of thing when Im
> > not sure:
> >
> > php -r 'function foo() { static $x = 1; echo "foo ", $x++, "\n"; foo(); }
> > foo();'
> >
> > which proves quite adequately that there is no function recursion limit
> as
> > such,
> > and that the error message is simply 'Segmentation Fault' as opposed to
> > some message
> > about recursion limit being reached.
> >
> > therefore the recursion limit, whether in defined in php source or in
> user
> > land code
> > is something specific to the XML extension/code the OP was using.
> >
> >>
> >> I thought that it was at 60 though...
> >>
> >> --Paul
> >>
> >>
> >>
> >> ------------------------------------------------------------------------
> >>
> >> All Email originating from UWC is covered by disclaimer
> >> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> Running your code shows that there is a limit. Although it doesn't throw an
> error.
> It just stops after n recursive calls:
>
> php4 recursive calls:   796
> php5 recursive calls: 49841
> php6 recursive calls:  6007
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

    I tried to play it every-which-way possible, and found that I
didn't have an error message displayed on my server, either, even with
E_ALL on.  Instead, with no stdout from PHP through Apache on
high-load runs (~30,000 recursions), it would kick out an HTTP 500
(Internal Server Error), most likely due to a segfault like Jochem
mentioned from the CLI.  Check it out for yourself, complete with
source:
    http://www.pilotpig.net/code-library/recursion.php

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished....

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux