2

I have got xdebug problem while developing the website in wamp it limits caching to 256. I have tried disabling xdebug extension but after disabling I refreshed the website and it show just white screen. I have also tried increasing the value of xdebug.max_nesting_level but it crashes all website and whole website goes down.

I have no Idea what to do anymore. Any help will be appreciated.

enter image description here

17
  • 3
    you are nesting 256 functions one inside the other? I'd review my software architecture instead of trying to expand the XAMP limits Commented Oct 18, 2018 at 11:57
  • 2
    Looks like you have an infinite recursion. Somewhere in your code you've made it so that loading this template requires loading this template. Commented Oct 18, 2018 at 11:57
  • 2
    @DatoDT Something is recursing. It's pointless increasing the limits, because it will just recurse for longer before throwing the same error. Commented Oct 18, 2018 at 12:02
  • 1
    If you disabled XDEBUG and the site still crashed then the issue is with the site code and not the tools that stand guard to warn you about coding mistakes like this. So leave the nesting level alone Commented Oct 18, 2018 at 12:02
  • 1
    @DatoDT: I doubt you can increate any limits to a number greater than infinite. You're thinking about this the wrong way. If the code is broken, don't try to break the system in a similar enough way that it goes unnoticed. Fix the code. Commented Oct 18, 2018 at 12:02

1 Answer 1

2

Xdebug is doing exactly what it is supposed to do. You seem to be recursively including a Twig template. Xdebug aborts your script with this error message, before PHP crashes. When you disable Xdebug, the "white screen" that you get, is PHP crashing. You can likely find evidence for that with sudo dmesg or in your PHP-FPM log file. It should say something akin to segmentation fault.

The right way of solving this, is by making sure you are not including the same template in a recursive fashion. Please note, that this could also happen through a recursive PHP variable structure that you're trying to display with Twig.

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

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.