Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

opheliadesign's avatar

@jimmck one of us is confused :) As far as I know, PHPStorm and Homestead are unaware of each other. The error is occurring when I try to fire the event from within my web browser on the Homestead site - for example, demo.org:8000/whatever. I was able to make the Maximum nested level error go away when I added the line to set it to 250, but I commented that out just to try and figure out exactly where this originated - it was the call to Mail in my listener.

Earlier you showed an example of how to change the xdebug setting and it looked like php.ini in MAMP, which would be installed directly on your machine. I'm doing all of this on a virtual box, laravel/homestead. Just so we're on the same page.. :)

jimmck's avatar

@opheliadesign Is debug bar installed. If you are not in debug mode you should not be getting this error. I assume you are firing the event through a controller? Local/external does not matter if nothing is connected to xdebug that is the source of my confusion.

opheliadesign's avatar

@jimmck no I have not installed debug bar yet. I'm assuming that debug mode is on by default in Homestead? Because every reference to this error that I have seen has instructed people to change that value from 100 to 250 (or, in my case, I could not find a default setting for it - adding the line made the error go away).

Do you use Homestead or MAMP? I mean, when you develop locally, do you run homestead up or vagrant up and then go to yoursite.app:8000?

johnf's avatar

@opheliadesign Check your .env file for QUEUE_DRIVER=redis. Looks the same issue for me, if I set QUEUE_DRIVER=sync in my .env file all works...

pulsarcoder's avatar

Hi,

Me too faced the same issue, and resolved it by changing the Route::auth(); code location in routes.php

Check whether you have placed Route::auth(); inside Route::group(['middleware' => 'web'], function() {});

If so make Route::auth() free of web middleware, i.e., place it at the initial line of routes.php file and check.

For me its worked great!!!

I think the problem relies in the middleware because in PasswordController they have used middleware in constructor as well.

wasim@lemosys.com's avatar

Solved !!!!!!! ENJOY Issue is caused by default xdebug.max_nesting_level which is 100.

The workaround for now is to increase xdebug.max_nesting_level to a certain level say 200 or 300 or 400

I fixed mine by increasing xdebug.max_nesting_level to 120, by adding the line below to bootstrap/autoload.php in Laravel 5.1

ini_set('xdebug.max_nesting_level', 120);

.........

define('LARAVEL_START', microtime(true));

1 like
Zigomario's avatar

(sorry bad english )

I'm really not expert but i give my experience for maybe , other understand this problem of "max_nesting..."

I have 2 site on local ( Wamp )

First site => 0 problem all is good.

In the same time, on other port

Second site => With EXACTLY the same pattern, When i use " $this->middleware('auth');" + blade on view i have sometime :

FatalErrorException in Container.php line xxx: Maximum function nesting level of '100' reached, aborting!

sometime :

FatalErrorException in Blade.php line xxx: Maximum function nesting level of '100' reached, aborting!

sometime : white view...

///////////////////////////

I have try to change .max_nesting ( i think this is in php.ini of wamp , under block line "xdbug"...no ?) => 200/300/500 : no effect

And...i have delete the ONLY difference bettewen Site 1 and site 2 :

An debug bar : https://github.com/barryvdh/laravel-debugbar , for wich we need to add service provider and aliases in app.php. If i delete this 2 line : site 2 work, and no problem.

///////// ////

So for me...atleast taht i have don't understand how to increase xdebug.max => this is not the real problem !

//////////////////////

edit....

Finally => the probleme is always here....but, now, only for one page.... i don't understand...

Previous

Please or to participate in this conversation.