Welcome Guest, Not a member yet? Register   Sign In
CI Controller not found..
#1
Wink 
(This post was last modified: 08-06-2020, 11:17 AM by shez1983.)

EDITED: so i figured out - one config variable i mistakenly deleted or somethin ie. it was missing

so i have been getting this error but not sure why?

Code:
Fatal error: Uncaught Error: Class 'CI_Controller' not found in /var/www/website/system/core/CodeIgniter.php:369 Stack trace: #0 /var/www/website/application/core/MY_Exceptions.php(7): get_instance() #1 /var/www/website/system/core/Common.php(196): MY_Exceptions->__construct() #2 /var/www/website/system/core/Common.php(652): load_class('Exceptions', 'core') #3 [internal function]: _exception_handler(Object(Error)) #4 {main} thrown in /var/www/website/system/core/CodeIgniter.php on line 369

Fatal error: Uncaught Error: Class 'CI_Controller' not found in /var/www/website/system/core/CodeIgniter.php:369 Stack trace: #0 /var/www/website/application/core/MY_Exceptions.php(7): get_instance() #1 /var/www/website/system/core/Common.php(196): MY_Exceptions->__construct() #2 /var/www/website/system/core/Common.php(617): load_class('Exceptions', 'core') #3 /var/www/website/system/core/Common.php(689): _error_handler(1, 'Uncaught Error:...', '/var/www/websit...', 369) #4 [internal function]: _shutdown_handler() #5 {main} thrown in /var/www/website/system/core/CodeIgniter.php on line 369

googling around people said it might be the database connection problem but those are set properly.

If i change the env to production (ie surpressing errors) - site works fine, i can even LOG IN fine so even if db wasnt set properly i wouldnt have been able to log in and at that point it would throw/give me the DB settinsg are wrong (paraphrasing here)

the other thing i found is sometimes if there are errors in actual code (controllers) then this gets fired.. :/
Reply
#2

@shez1983,

Some questions...what version of CI are you using? What are the db config for dev? Are they the same as Prod? Are the database versions the same? Are the permissions on the controllers setup correctly on DEV?
Reply
#3

(08-06-2020, 06:59 AM)php_rocs Wrote: @shez1983,

Some questions...what version of CI are you using?  What are the db config for dev? Are they the same as Prod? Are the database versions the same?  Are the permissions on the controllers setup correctly on DEV?

Hi thanks for coming back..

3.1.9.

So the only thing I have changed, or trying to change (in staging server, where i am testing it out first) is that In config files i am doing something like

$config['item']  = $_SERVER['item'];

and then in my apache conf file i am setting ENV

setEnv  item  value

When i mentioned production.. I meant on my STAGING server if i change the environment to production/testing which doesnt display errors to user, everything works.. but as soon as i change env back to development i get an error..
Reply




Theme © iAndrew 2016 - Forum software by © MyBB