Drupal installation: Set xdebug.max_nesting_level=256 in your PHP configuration

12,579

You need to add this line xdebug.max_nesting_level = 256 in correct php.ini file instead of settings.php

To it correctly follow below steps:

  1. Open notepad or any text editor and save it as phpinfo.php with content

    <?
    php phpinfo();
    ?>
    
  2. Put this file in directory which you renamed in the given youtube tutorial i.e. drupal installation directory

  3. Start your wampserver and goto this directory using any browser. Info like this would appear.enter image description here

  4. You now have the correct php.ini in which you need to make the xdebug changes

  5. Find the xdebug and at the end add this line.Like this enter image description here

  6. Save the file and restart wamp server.

enter image description here

  1. Now go to the Requirements problems page and you won't see this problem.
Share:
12,579
paul
Author by

paul

Updated on June 13, 2022

Comments

  • paul
    paul almost 2 years

    I am following a tutorial here https://www.youtube.com/watch?v=h5i6emqdOgg

    In between the installation I get this page, where it shows that there are some requirements missing. One of them says Set xdebug.max_nesting_level=256 in your PHP configuration

    I went to C:\wamp\www\sampleWebSite\sites\default which has :

    1. files
    2. default.services.yml
    3. default.settings.php
    4. settings.php

    I opened settings.php to see xdebug settings but it was missing there. So I added a line there xdebug.max_nesting_level=256 and then refreshed the page and page gave me error, so I went to same settings.php file again and changed it $settings['xdebug.max_nesting_level'] = 256; there is no error now but page still shows that xdebug setting is not set to 256.

    How to fix it?

    enter image description here

  • paul
    paul over 8 years
    I added above line at the end of php.ini at this location C:\wamp\bin\php\php5.5.12\php.ini but no change error is still there.
  • greg606
    greg606 over 8 years
    did you restart the server? is it the correct php.ini that is actually being used?
  • greg606
    greg606 over 8 years
    also please, upgrade your php/wamp - we already have php 7 but you should use at least 5.6
  • greg606
    greg606 over 8 years
    if you confirm the php.ini is correct and server restarted, one more thing which seems possible that this setting could be overwritten somewhere -> then you should use text search to find where
  • paul
    paul over 8 years
    this php came with latest wamp from wampserver.com. And Yes, I started the server after editing php.ini. I am not sure this is the correct php.ini I am new to drupal.
  • greg606
    greg606 over 8 years
    did you try to use phpinfo() to locate php.ini or here /admin/reports/status/php - to locate the correct php.ini
  • Hamad
    Hamad over 5 years
    Thank You i have put the code in .htaccess file of the drupal site and it works