lessphp icon indicating copy to clipboard operation
lessphp copied to clipboard

Fatal error: Maximum function nesting level of '250' reached, aborting!

Open AlexisBarta opened this issue 12 years ago • 6 comments

I have the following error, with Flat-UI Kit by designmodo (download here: https://github.com/designmodo/Flat-UI/archive/master.zip ):

( ! ) Fatal error: Maximum function nesting level of '250' reached, aborting! in /website/lessc.inc.php on line 490
Call Stack
#TimeMemoryFunctionLocation
10.0026229760{main}( )../index.php:0
20.0045909032lessc->compileFile( )../index.php:10
30.0048914304lessc->compile( )../lessc.inc.php:1687
40.0270979952lessc->compileBlock( )../lessc.inc.php:1663
50.0271980160lessc->compileRoot( )../lessc.inc.php:186
60.0271982328lessc->compileProps( )../lessc.inc.php:271
71.29677763040lessc->compileProp( )../lessc.inc.php:277
81.29677763088lessc->compileImportedProps( )../lessc.inc.php:707
91.29677764136lessc->compileProp( )../lessc.inc.php:155
101.29677764088lessc->compileBlock( )../lessc.inc.php:622
111.29677764088lessc->compileCSSBlock( )../lessc.inc.php:189
121.29687766784lessc->compileProps( )../lessc.inc.php:215
...............
2441.44449957664lessc->compileProp( )../lessc.inc.php:665
2451.44449957968lessc->findBlocks( )../lessc.inc.php:628
2461.44449958320lessc->findBlocks( )../lessc.inc.php:572
2471.44449958760lessc->findBlocks( )../lessc.inc.php:572
2481.44449959288lessc->patternMatchAll( )../lessc.inc.php:548
2491.44449959640lessc->patternMatch( )../lessc.inc.php:529

I don't know why I have this error. The compilation is working with the node package.

AlexisBarta avatar Jul 04 '13 09:07 AlexisBarta

Seems you have xdebug installed!

Call this function at the beginning of you code: ini_set('xdebug.max_nesting_level', 400) or update your php.ini / .htaccess File with those parameters.

For further information look at http://www.xdebug.org/docs/basic

Handfeger avatar Jul 05 '13 10:07 Handfeger

Indeed, I already tried to put the max_nesting_level to 500 and I have the same error : "Fatal error: Maximum function nesting level of '500' reached, aborting! in /Users/AlexisBarta/Documents/lab/lessc.inc.php on line 490".

And if I totally disable xdebug, I have this error : "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 130968 bytes) in /Users/AlexisBarta/Documents/lab/lessc.inc.php on line 627".

AlexisBarta avatar Jul 09 '13 11:07 AlexisBarta

Same here..the weird thing is that the exact same less files work in another project which uses lessphp 0.3.9.

hacfi avatar Oct 18 '13 14:10 hacfi

@delux75 @hacfi Did you solve this?

ronnyandre avatar Nov 03 '15 17:11 ronnyandre

@ronnyandre I stopped using lessphp a long while ago so not really sure if that’s really an issue or if the code just gets very nested with larger files. I’d try increasing xdebug.max_nesting_level in 100 steps and see what happens.

hacfi avatar Nov 03 '15 17:11 hacfi

Same as @hacfi I stopped using it too.

AlexisBarta avatar Nov 17 '15 08:11 AlexisBarta