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

后端 未结 22 2038
我寻月下人不归
我寻月下人不归 2020-11-22 16:45

I have made a function that finds all the URLs within an html file and repeats the same process for each html content linked to the discovered URLs. The function is recursiv

相关标签:
22条回答
  • 2020-11-22 17:12

    Another solution if you are running php script in CLI(cmd)

    The php.ini file that needs edit is different in this case. In my WAMP installation the php.ini file that is loaded in command line is:

    \wamp\bin\php\php5.5.12\php.ini
    

    instead of \wamp\bin\apache\apache2.4.9\bin\php.ini which loads when php is run from browser

    0 讨论(0)
  • 2020-11-22 17:13

    It's also possible to fix this directly in php, for example in the config file of your project.

    ini_set('xdebug.max_nesting_level', 200);

    0 讨论(0)
  • 2020-11-22 17:13

    probably happened because of xdebug.

    Try commenting the following line in your "php.ini" and restart your server to reload PHP.

      ";xdebug.max_nesting_level"

    0 讨论(0)
  • 2020-11-22 17:14

    I had this issue with WordPress on cloud9. It turns out it was the W3 Caching plugin. I disabled the plugin and it worked fine.

    0 讨论(0)
提交回复
热议问题