Welcome Guest, Not a member yet? Register   Sign In
Fatal error after ['cache_on'] is set to TRUE
#1

[eluser]halluchen[/eluser]
Hello,

I'm trying to use the database cache feature for the first time and have an issue.
When I'm setting the ['cache_on'] to true i'm getting the following error:
( ! ) Fatal error: Class 'CI_Controller' not found in localhost\site\system\core\CodeIgniter.php on line 233
I'm using CodeIgniter 2.1.3


I don't understand why it happens.
Will be thankful for any help.

Thanks,
Chen
#2

[eluser]TheFuzzy0ne[/eluser]
I've no idea why that is, since the code where the error is has nothing to do with the database.

Code:
// Load the base controller class
require BASEPATH.'core/Controller.php';

function &get;_instance()
{
    return CI_Controller::get_instance(); // Line 233
}

Since the bootstrap requires Controller.php, it can't be a case that it's simply not being loaded. I can only assume that you may have edited the system files somehow, and ./system/core/Controller.php no longer contains the CI_Controller class?
#3

[eluser]halluchen[/eluser]
This line is exactly the same in my CodeIgniter core file and I didn't changed this core file or any other core file...
#4

[eluser]TheFuzzy0ne[/eluser]
I cannot reproduce this issue. Please try deleting your ./system directory, and copying it back over from the original zip file.
#5

[eluser]halluchen[/eluser]
Did that and still have the same issue... :/
#6

[eluser]rana[/eluser]
Did you tried to turn database caching on by "$this->db->cache_on();" code manually (just for test) ? does that work?
#7

[eluser]halluchen[/eluser]
Not working.....

Maybe it's because I'm in localhost?

Thanks for the help!
#8

[eluser]TheFuzzy0ne[/eluser]
Whether you're running on localhost or not should not make any difference.

Just a shot in the dark, but have you tried clearing your cache?

Are you sure you're system path is set correctly, and it's not pointing to an older, modified installation?

Have you made sure your cache directory is writable?

If that doesn't help, the only thing I can think of, is that your RAM might be on it's way out. It might be worth running [url="http://www.memtest.org/"]Memtest86+[/url] to double-check your system memory.
#9

[eluser]halluchen[/eluser]
Hi,

I cleared my cache, used another browser, another cache directory and nothing is changed, still same error.
I haven't checked my memory yet, will check it today and will update.

Thanks!
#10

[eluser]halluchen[/eluser]
Nothing solved it, even on my production server... Sad




Theme © iAndrew 2016 - Forum software by © MyBB