CodeIgniter Forums
Codeigniter is stuck in some kind of nesting loop. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Codeigniter is stuck in some kind of nesting loop. (/showthread.php?tid=61494)



Codeigniter is stuck in some kind of nesting loop. - Brian - 04-20-2015

So I am new to Codeigniter and I was jsut going through the tutorial. Doing the news thing and when I went to load the page localhost/NewsApp/index.php/news I get the error:

Fatal error: Maximum function nesting level of '200' reached, aborting! in C:\wamp\www\NewsApp\system\database\DB_driver.php on line 963

I am running wamp, I have seen other forums. At first the execution time wasn't enough so now its set at 1200 and the nesting level is at 200 so I think its safe to say they aren't the problem. I am connecting to SQL server localdb and I connected using cake so I know its working. Running on php 5.5. It seems to be just calling the same 4 functions. What's going on here?


RE: Codeigniter is stuck in some kind of nesting loop. - Rufnex - 04-20-2015

As i remember this is a topic from wamp and it belongs to the xdebug. You can incrase the value of xdebug.max_nesting_level. It's located in the php.ini. e.g.

xdebug.max_nesting_level=400


RE: Codeigniter is stuck in some kind of nesting loop. - Brian - 04-21-2015

So I did that. Then the execution time expired at 1200s so I incresed it to 1700s (28 minutes). After that I tried again the nesting level was reached at 400, which I think is ridiculous for a simple db query, so I don't think that's the problem.


RE: Codeigniter is stuck in some kind of nesting loop. - ivantcholakov - 04-21-2015

It is strange, looks like infinite recursion.

Code:
<?php
class News_model extends CI_Model {

        public function __construct()
        {
                $this->load->database();
        }
}

Try this workaround:
1. Remove the line $this->load->database();
2. Autoload database using the configuration file autoload.php


RE: Codeigniter is stuck in some kind of nesting loop. - RPeace - 08-18-2015

(04-20-2015, 10:39 AM)Brian Wrote: So I am new to Codeigniter and I was jsut going through the tutorial. Doing the news thing and when I went to load the page localhost/NewsApp/index.php/news I get the error:

Fatal error: Maximum function nesting level of '200' reached, aborting! in C:\wamp\www\NewsApp\system\database\DB_driver.php on line 963

I am running wamp, I have seen other forums. At first the execution time wasn't enough so now its set at 1200 and the nesting level is at 200 so I think its safe to say they aren't the problem. I am connecting to SQL server localdb and I connected using cake so I know its working. Running on php 5.5. It seems to be just calling the same 4 functions. What's going on here?


I get this error too, i am working with SQL Server 2008 and when i load the database config, codeigniter gets inside a loop calling initialize() infinite times, but when i connect to mysql it works
I also tried to increase the maximum nesting level in xdebug but every time it reaches the max and throws that error,

Working with CI 3.0, sql server 2008 R2, sql server native client, Apache/2.4.16 (Win32), PHP/5.6.11


RE: Codeigniter is stuck in some kind of nesting loop. - Narf - 08-19-2015

https://github.com/bcit-ci/CodeIgniter/commit/eb492589cb6ba0faaadadebe2a5cd333de80b6c4