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.
If the following message (or a similar one) displays during the installation of the Magento 2 software, you have to follow the guide below:
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.
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 xdebug documentation.
Next, it is necessary to restart Apache. On CentOS, use this command: