Increasing Nesting Function Calls Limit

Increasing nesting function calls limit

This error message comes specifically from the XDebug extension. PHP itself does not have a function nesting limit. Change the setting in your php.ini:

xdebug.max_nesting_level = 200

or in your PHP code:

ini_set('xdebug.max_nesting_level', 200);

As for if you really need to change it (i.e.: if there's a alternative solution to a recursive function), I can't tell without the code.

Limit for nested function calls in C (C99)

No. Since these functions are executed one by one, there is no issue.

int res;
res = fnN(parN1, parN2);
....
res = fn2(res, par2);
res = fn1(res, par1);

The execution is linear with previous result being used for next function call.

Edit: As explained in comments, there might be a problem with parser and/or compiler to deal with such ugly code.

Increasing maximum function nesting level

In php5 you need to modify vim /etc/php5/mods-available/xdebug.ini, if not exist, create it.
My config :

zend_extension=/usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.max_nesting_level = 250

Maximum function nesting level of '100' reached, aborting after upgrading to Laravel 5.1

Issue is caused by default xdebug.max_nesting_level which is 100.

The workaround for now is to increase xdebug.max_nesting_level to a certain level say 200 or 300 or 400

I fixed mine by increasing xdebug.max_nesting_level to 120, by adding the line below to bootstrap/autoload.php in Laravel 5.1

ini_set('xdebug.max_nesting_level', 120);

.........

define('LARAVEL_START', microtime(true));

Cannot resolve 'Fatal error: Maximum function nesting level of '500' reached, aborting'

I think you have recursion and in your case increasing nesting leved will not help.

Try comment code in your controller and see happens problem or not.
Also please provide more information, which framework/cms you use (or this is custom framework).

Solution for Fatal error: Maximum function nesting level of '100' reached, aborting! in PHP

A simple solution solved my problem. I just commented this line:

zend_extension = "d:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll

in my php.ini file. This extension was limiting the stack to 100 so I disabled it. The recursive function is now working as anticipated.



Related Topics



Leave a reply



Submit