Magento 2 Error – Maximum Function Nesting Level Of ‘100’ Reached

After install Magento 2, I got error like Fatal error: Maximum function nesting level of ‘100’ reached, aborting!. How can I fix this Magento 2 error

If you have enabled the PHP extension – xdebug, you will get Fatal error: Maximum function nesting level of ‘100’ reached, aborting! .

To resolve this issue

  1. Disable the xdebug extension (2 ways)
    1. Disable the xdebug via php.ini
      xdebug.remote_autostart=0  
      xdebug.remote_enable=0
      xdebug.profiler_enable=0
    2. Using command to disable the PHP extension
      For php5 (Ubuntu)

      sudo php5dismod xdebug
      sudo service apache2 restart

      For php7 (Ubuntu)

      sudo phpdismod xdebug
      sudo service apache2 restart
  2. Increasing the value of max_nesting_level (2 ways)
    1. Via php.ini
      xdebug.max_nesting_level = 200
    2. In your PHP code
      ini_set('xdebug.max_nesting_level', 200);
  3. 0 0 votes
    Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments