Welcome Guest, Not a member yet? Register   Sign In
Memory error message / Xdebug inifiiteloop
#1

Hi,

I'm converting my codigniter3 source to codeigniter4 and i have some issues with the conversion of my scripts.

I have two enviroments to build my scripts one of the enviremont(php8.0.19) i get the following error:

Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '4096' frames search →

Location: SYSTEMPATH/Config/Factories.php at line 222

And my other server(PHP8.4) get with the same scripts :

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 229376 bytes) in /var/www/site/htdocs/vendor/codeigniter4/framework/system/Log/Handlers/FileHandler.php on line 98

On both server is using the latest codeigniter version 4.3.7

I dont know what todo on the moment beside to get back to codeigniter3, can somebody give me some hint what i'm doing wrong.

kind regards,
Whatsnow
Reply
#2

PHP 8.4 does not exist yet.

Check the code that the errors happened, and debug.
Reply
#3

(This post was last modified: 08-22-2023, 12:59 AM by whatsnow.)

(08-21-2023, 06:16 PM)kenjis Wrote: PHP 8.4 does not exist yet.

Check the code that the errors happened, and debug.

Yes i made a typo, its php8.3, i think i found my issue, in codeigniter3 i used the load->library tool and now i'm using:

PHP Code:
use App\Libraries\myclass

$this
->newclass = new myclass(); 

I'm using somewhere double the code to load an class, and i think thats my problem.

Can that be the problem?
Reply
#4

If the class myclass causes an infinite loop, it can be the problem.
Reply
#5

I'm only using the foreach for my array's to walk throug and they are massive array..

I have used the CI3 never had the issue with this infiniteloop, is there in CI4 an singletone used i cant read it in the documentation?
Reply
#6

See https://codeigniter4.github.io/CodeIgnit...ories.html
Reply




Theme © iAndrew 2016 - Forum software by © MyBB