It’s a simply weird and misleading error message. I was working on a client project which was actually based on Codeigniter (CI) framework version 2.1.3. Somehow, I did a typo in DB setting located at config/database.php file. But, I got a very weird error message: Fatal error: Class ‘CI_Controller’ not found in /var/www/my/……./system/core/CodeIgniter.php on line 233 as below….
At a first glance, it seemed that there was a bug in CI Core class. But, it was actually a misleading message. It should have been a database connection error. And, after tracing out the error message properly with xdebug (You must have xdebug installed in your PC to get the above error tracing), i got that there was error coming from DB drive. So, quickly checked the DB setting and fixed the typo. But, In the mean time, I already passed two hours for fixing. Finally, at least I saved my ass from losing two hours more. 😛
Hi Eftakhairul,
Thank you for leading me to right direction and not waste my 2 hours cuz of misleading error message.
I had similar error message and spent few minutes. I tried re-uploading the system files too but of no use. Finally I found this post and checked my DB setting where my DB config was not right. Once i fixed it.. my site is up and running.
Thank you so much.
Thanks for your feedback. It will motivate me to write more posts like this one. Keep continue reading my blog. Some more interesting blog post is coming.
Hello, i am still stuck with the same error perhaps i have changed database_name,username,password in database.php file according to the 000webhost.
Please help me!
hey what db setting’s wrong that lead to this error, db hostname or what ?
Hi,
This could be any kind of DB setting error. If your system doesn’t connect to your DB, it will come up with this kind of weird error.
Hey,
This was really useful, I was about to spend time on this bug with CI controller and you save me.
Thank you for posting this.
Regards
John
Thanks for your nice feedback. It will help us to write more posts like this. Keep in touch with my blog with more upcoming interesting posts.
I am getting the same error when I am checking the other pages which is coming from db that is working fine but when I am trying to login with form I am getting this error.
any solution now?
Hey!,
I got same error. To remove that i changed my DB settings according to your advise.Now it is working fine.Then i downloaded “php_xdebug-2.3.3-5.6-vc11-x86_64.dll”. Where should i copy this file, please help???
Thanks .. it worked
Hello ,
I am facing another problem when i run this url http://localhost/projectName/admin‘ then i am getting above error.Please help me
There is no problem with the database but I am getting this error: http://prntscr.com/mp14fi
Thanks in advance
Yes , the same issue happened with me and it was database credential error