I am getting

fatal error maximum function nesting level of '100' reached aborting..

It seems I have to edit

xdebug.max_nesting_level from 100 to more. 

But I am unable to find the correct file in where I should edit this? I am using Ubuntu 14.04 , lighttpd webserver and Php..

From internet I saw I have to edit php.ini file in /etc/php5/apache2..

But I am using lighttpd.

In my /etc/php5/ there are three folders namely

  1. cgi
  2. cli
  3. mods-available

In the cgi and cli folder there are php.ini file, But those 2 files did not contain anyting to edit xdebug.

In mods-available folder I got 1 file namely xdebug.ini and it just contains


So I need help how to edit xdebug.max_nesting_level in ubuntu 14.04 PHP and Lighttpd. Sorry for my bad English. Seeking your help to solve this

  • try "locate php.ini" in order to find php configuration file. – Lety Aug 26 '14 at 10:15
  • I mentioned that in my /etc/php/cgi/ there is a file named php.ini, but in that file there is nothing about xdebug configuration to edit that.. – oxvoxic Aug 26 '14 at 13:01
  • Yes, sorry, I suggest to locate file in order to check if there are other then the two you mentioned. Anyway, you did not find xdebug.max_nesting_level because this is a xdebug variable. So, I'm not sure, but try to add "xdebug.max_nesting_level = 150" in xdebug.ini after zend_extension and let's see if it resolves the issue. – Lety Aug 26 '14 at 13:44
  • But when I run phpinfo from localhost in browser there shows xdebug and all of its configuration including xdebug.max_nesting_level=100.. so I guess the configuration must be written somewhere.. Unfortunately I am not finding it yet .. – oxvoxic Aug 26 '14 at 14:12
  • Yes, phpinfo show you default value for all xdebug variables, this means that xdebug.so extension is correctly loaded by php. You can not find these settings in any configuration file. Did you try my suggestion? – Lety Aug 26 '14 at 18:19

To fix the issue, I edited /etc/php5/apache2/conf.d/20-xdebug.ini and added the following line:

xdebug.max_nesting_level = 250

phpinfo show you default value for all xdebug variables, this means that xdebug.so extension is correctly loaded by php.

In order to change xdebug.max_nesting_level default settings open xdebug.ini and add:


Similarly, you can also change other xdebug variables.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.