EllisLab text mark
Advanced Search
     
CI_Controller error
Posted: 27 October 2011 06:16 PM   [ Ignore ]
Joined: 2011-10-27
3 posts

Fairly new to CodeIgniter, but am getting a weird problem and hoping the community can help me solve the issue.

I have a controller ‘Currency’ that is failing to instantiate with a base constructor.

class Currency extends REST_Controller
{

 
function __construct()
 
{
  parent
::__construct();

 
}

so tracing through the parent constructor all the way back to the matriarch CI_Controller
everything is peachy keen until it seems to fail on this line:

$this->load->set_base_classes()->ci_autoloader(); 

In the CI_Controller __constructor….
Anyone have any idea why that might be happening?

 
Posted: 28 October 2011 10:08 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-10-25
62 posts

Do you have your REST_Controller in the application/core folder ?

 
Posted: 28 October 2011 11:58 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2011-10-27
3 posts

Yes, it is there… Like I said I tested it all the way down the rabbit hole to that one line in CI_Controller

It doesn’t seem to be able to find the _ci_autoloader()

I think there is probably something wrong with the config, but not sure which part would effect this

 
Posted: 28 October 2011 03:32 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2008-12-23
189 posts

what error are you getting?

 
Posted: 28 October 2011 03:36 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2011-10-27
3 posts

There is no error message…

I ended up just going back to a clean code base and then adding in my custom controllers, and everything is fine now.

 
Posted: 02 October 2012 11:33 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2010-04-20
3 posts

I stumbled upon the same error. In my case it was the missing table ci_sessions. Just wanted to let you know.

Cheers
Dirk