How to fix xdebug maximum function nesting level error during Magento 2 installation

Below, we describe how to fix the xdebug maximum function nesting level error during the Magento 2 installation. You can discover more useful recommendations on how to fix other Magento 2 errors here: Magento 2 Cookbook.
The Issue
If the following message (or a similar one) displays during the installation of the Magento 2 software, you have to follow the guide below:
|
1 |
PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in <path>/ClassLoader.php |
The Solution
The xdebug issue affects not only the Magento installation but may also prevent access to the storefront or Magento Admin after it. Thus, if your development practices rely upon the optional xdebug PHP extension, you can encounter various exceptions, including the ones we’ve just mentioned.
A sample exception looks as follows:
|
1 |
Fatal error: Maximum function nesting level of '100' reached, aborting! |
However, it is not difficult to resolve the issue. You only have to increase the maximum function nesting level. Do the following:
- First of all, it is necessary to disable the xdebug extension.
- After that, you can increase the value of the xdebug.max_nesting_level setting up to 200 or more. Do that either in php.ini or in a folder with configuration files for PHP extensions where the xdebug.ini file is situated. You can find the location of php.ini in wamp manager or with the help of the phpinfo() function. For more information, explore the .
- Next, it is necessary to restart Apache. On CentOS, use this command:
1sudo service httpd restart
On Ubuntu, enter the following one:
1sudo service apache2 restart
You can find more facts about the issue in this article: .







