0

I am currently working on Symfony, Rest API. I am new to this framework. I have installed Symfony correctly. and now I have installed FriendsOfSymfony bundle, every thing is going fine but when I am clicking on logout then I am getting following error

 Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\xampp\htdocs\Symfony\vendor\twig\lib\Twig\Loader\Filesystem.php on line 6010

After some searching I found a solution to set xdebug in php.ini, to set set limit 200 instead of 100, then I am getting the following Error,

 Fatal error: Maximum function nesting level of '200' reached, aborting! in C:\xampp\htdocs\Symfony\vendor\twig\lib\Twig\Loader\Filesystem.php on line 6010

Totally I am unable to see a demo of symfony also. Please guys tell me how Can I come out of this problem ?

2
  • There is some infinite loop somewhere of course, check your code about possible recursions. Commented Nov 9, 2012 at 12:54
  • possible duplicate of Symfony 2.1, Twig errors Commented Nov 9, 2012 at 13:35

2 Answers 2

3

Try to check the call stack. Maybe you have an ifinite loop. Deactivate xDebug or set the maximum nesting level in the php.ini higher:

xdebug.max_nesting_level=500

This is a normal behavior. try something like:

    $traceStack = debug_backtrace();
    var_dump($traceStack);
    $i=0;
    foreach($traceStack as $n) {
        /* do what you want here */
        /*
         *   $n is an array of:
         *   'file' => ..
         *   'line' => ...
         *   'function' ...
         *   'class' => ...
         *   'object' => ...
         *   'type' => ...
         *   'args' => ...
         */
    }

Important: Don't forget to restart apache (or FPM)!

Sign up to request clarification or add additional context in comments.

2 Comments

when I am deactivating xDebug then I am getting error of 100 levels and i have set the level upto 500 also, I am getting the same error
I am new to symfony, and I am getting this problem only in demo page http://localhost/Symfony/web/app_dev.php/ at this url, please can u help me how can i solve this ?
0

In my case, it was related to composer. Some vendors were updated in the composer.json file, but I forgot to run the commands composer update nor composer install. The system generated a cascade of errros, which was causing this 'maximum nested level'.

After executing those commands, the problem was fixed

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.