in Container.php line 698
at Application->handleShutdown() in RegistersExceptionHandlers.php line 55
at Application->Laravel\Lumen\Concerns{closure}()
changeinh in php.in then also getting same error
//$credentials = $this->getCredentials($request);
$credentials = $request->only('email', 'password');
try {
// attempt to verify the credentials and create a token for the user
if (! $token = JWTAuth::attempt($credentials)) {<-(on this line i think error)
return response()->json(['error' => 'invalid_credentials'], 401);
}
} catch (JWTException $e) {
// something went wrong whilst attempting to encode the token
return response()->json(['error' => 'could_not_create_token'], 500);
}
Maximum function nesting level of '100' reached, aborting!
That's not a very large number. Try increasing xdebug's limit to more like 1024.
[xdebug]
zend_extension=/usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_autostart=0
xdebug.remote_connect_back=0
xdebug.max_nesting_level = 5000
If 5000 is your max, the error should say 5000 and not 100
You're probably reading the wrong config file
Make sure you're reading the CLI's config if you're running from the CLI
@crynobone I have change that after getting error.
In general these maximum nesting issues have little to do with jwt-auth. Laravel's container takes around 50-60 method levels alone. Add some routing/controller logic and maybe some middleware or package use, and it's pretty easy to hit 100. It just happens that this limit might get hit during one of jwt-auth's method calls.
Ultimately, when using XDebug with Laravel, you should increase that nesting level regardless. 100 isn't some magical number where things are slow or problematic and in general PHP can be pushed much higher. (If speed of function calls mattered that much to you, you should probably be using something lighter than Laravel anyway.)
in the laravel 5 or higher
/bootstrap/autoload.php
add this line to this file
ini_set('xdebug.max_nesting_level', 120);
Most helpful comment
in the laravel 5 or higher
/bootstrap/autoload.php
add this line to this file
ini_set('xdebug.max_nesting_level', 120);