magic.77
magic.77

Reputation: 917

Script abort because of a possible infinite loop

I have followed this instructions to setup the latest version of NEOS:

  1. https://docs.neos.io/cms/installation-development-setup/manual-installation-with-a-web-server

  2. https://docs.neos.io/cms/installation-development-setup/running-the-setup-tool

After i log into the CMS i get the following error:

Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames
Exception Code  0
Exception Type  Error
Thrown in File  Packages/Framework/Neos.Flow/Classes/ObjectManagement/ObjectManager.php
Line    539

My local environment:

PHP Version 7.3.26-1+ubuntu20.04.1+deb.sury.org+1
XDebug 3.0.2

what's going wrong here?

Upvotes: 9

Views: 32806

Answers (5)

Vlad Babenko
Vlad Babenko

Reputation: 11

mac os: 13.4.1

In the command line, type and check max_nesting_level

php -i | grep max_nesting_level

Go to the /usr/local/etc/php/8.1/conf.d folder

Find your ext-xdebug.ini, open and set like this:

xdebug.max_nesting_level=512

After that, restart php

brew services restart [email protected]

check again:

php -i | grep max_nesting_level

Will return:

xdebug.max_nesting_level => 512 => 512

Refresh your page, enjoy :)

Upvotes: 1

user21689890
user21689890

Reputation: 21

Solved for me by commenting in 20-xdebug.ini:
;zend_extension=xdebug.so

and conf xdebug in php.ini (from xdebug doc)
2. Add the following line to this PHP ini file:
zend_extension=xdebug

If Xdebug does not show up, or you get a warning from PHP that an xdebug.so file or similar was not found, you might need to use the full path instead of just zend_extension=xdebug, such as zend_extension=/usr/lib/php/20190902/xdebug.so

https://xdebug.org/docs/install

Upvotes: 2

nito
nito

Reputation: 1313

On MacOS with a arm64(M1, M2) processor and Homebrews PHP 8.1, open: /opt/homebrew/etc/php/8.1/php.ini

Add to the top of the file:

zend_extension="xdebug.so"

[PHP]

; Possible values for mode: off,develop,coverage,debug,gcstats,profile,trace
xdebug.mode=debug
xdebug.max_nesting_level=512

Restart PHP:

brew services restart [email protected]

Verify your changes:

php -i | grep max_nesting_level

Will return:

xdebug.max_nesting_level => 512 => 512

Upvotes: 3

Max Abramovich
Max Abramovich

Reputation: 49

This solves my problem:

"Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames"

Add to file:

/etc/php/8.1/apache2/conf.d/20-xdebug.ini

xdebug.max_nesting_level=512

And restart the server

Upvotes: 3

magic.77
magic.77

Reputation: 917

this solves my problem 20-xdebug.ini

[xdebug]
xdebug.max_nesting_level=512

php.ini

max_execution_time = 600

Upvotes: 17

Related Questions