Welcome Guest, Not a member yet? Register   Sign In
Codeigniter is stuck in some kind of nesting loop.
#1

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?

Attached Files Thumbnail(s)
   
Reply
#2

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

Reply
#3

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.
Reply
#4

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
Reply
#5
Exclamation 

(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

Attached Files Thumbnail(s)
   
Reply
#6

(This post was last modified: 08-19-2015, 01:17 AM by Narf.)

https://github.com/bcit-ci/CodeIgniter/c...33de80b6c4
Reply




Theme © iAndrew 2016 - Forum software by © MyBB