Issue: Class 'CI_Config' not found in codeigniter - php

I am trying to run a codeIgniter project downloaded from 1and1.co.uk ....
But when I am browsing it showing this message:
An uncaught Exception was encountered
Type: Error
Message: Class 'CI_Config' not found
Filename: C:\xampp\htdocs\projectname\system\core\Common.php
Line Number: 196
Backtrace:
File: C:\xampp\htdocs\projectname\index.php
Line: 315
Function: require_once
I dont know why?
The class is ok in system/core/config.
Its version in system/core/codeigniter is 3.1.8.
can anyone tell me the reason pls?
Atleast some clue!
never ever faced anything like this before !

You have duplicate config file also in application/core folder which was causing this issue, there should be only one config in application/config folder.

Related

Can't get the default controller of codeigniter to work in IIS

I am trying to host a codeigniter project on IIS Server but I can't get even the default controller to show instead what I receive is this below
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_URI::$config is deprecated
Filename: core/URI.php
Line Number: 101
Backtrace:
File: C:\inetpub\wwwroot\app\index.php
Line: 315
Function: require_once
I have web.config file, HTTP mappings, ISAPI, URL rewrite module and FastCGI all set but still the problem persist.
I will be very grateful if you guys can help me, am stranded.

Unable to locate an appunto-auth model in CI 3

I'm trying to integrate appunto system to my application so I followed the full installation structure from the documentation but all time I got the next message :
An uncaught Exception was encountered
Type: RuntimeException
Message: Unable to locate the model you have specified: Pathmodel
Filename: /var/zpanel/hostdata/zadmin/public_html/git-backup_releasecandidate_net/system/core/Loader.php
Line Number: 344
Backtrace:
File: /var/zpanel/hostdata/zadmin/public_html/git-backup_releasecandidate_net/application/libraries/appunto-auth/Appunto_auth.php
Line: 24
Function: model
File: /var/zpanel/hostdata/zadmin/public_html/git-backup_releasecandidate_net/index.php
Line: 315
Function: require_once
If you are following this guide. You may need to change these lines in Appunto_auth library class.
$this->CI->load->model('appunto-auth/pathmodel');
$this->CI->load->model('appunto-auth/usermodel');
You may remove the appunto-auth folder from the path to the models since they will no longer be in that directory as we have moved it according to the guide.
$this->CI->load->model('pathmodel');
$this->CI->load->model('usermodel');
You may do the same if your app screams about the helper and config files on lines 22 and 15.

My_Controller not found on server CodeIgniter

Dear: helper i run on wamp local server is working fine but i have problem with My_Controller is not found is core folder. I already insert My_Controller in core folder "core/My_Controller.php" and in config.php i already insert config too "$config['subclass_prefix'] = 'MY_';" anyone help me please?
Fatal error: Class 'MY_Controller' not found in /home/phnompen/public_html/my_side_url/application/controllers/Controller.php on line 9
A PHP Error was encountered
Severity: Error
Message: Class 'MY_Controller' not found
Filename: controllers/Controller.php
Line Number: 9
Backtrace:
Make you you have the MY in your file name not My
core/My_Controller.php
Change to
core/MY_Controller.php
Same as in my comment.

Fatal error: Class 'CI' not found after uploading to live server

I have a project built in Codeigniter 3 + HMVC. And Im almost done with it.
In my local copy it is working properly. But when I moved my project on a live server I got this error:
Fatal error: Class 'CI' not found in /var/www/vhosts/kuni.ph/httpdocs/teradasys/application/third_party/MX/Modules.php on line 92
A PHP Error was encountered
Severity: Error
Message: Class 'CI' not found
Filename: MX/Modules.php
Line Number: 92
Backtrace:
And here's the code on line 92
/* find the controller */
list($class) = CI::$APP->router->locate(explode('/', $module));
I dont know what is the error all about.
I also checked the config.php and update the base_url. And I also updated the database config.
Can you help me with this?

CodeIgniter Database Session Error

When I try to execute any controller of my CodeIgniter project i receive this error:
Fatal error: Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::read) in D:\Git\crud-farm\system\libraries\Session\drivers\Session_files_driver.php on line 49
A PHP Error was encountered
Severity: Error
Message: Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::read)
Filename: drivers/Session_files_driver.php
Line Number: 49
Backtrace:
I tried to replace CodeIgniter system files but it didn't work. The problem appears in all projects
Problem solved by restarting Apache.
I attach the url which saved me: http://forum.codeigniter.com/thread-64763.html
In my case i did the following
Restart apache
That's it!
The files in system should not be modified. My files were modified somehow and were throwing error. I resolved my problem as below.
Download fresh codeigniter and extract files
copy system files from fresh codeigniter into your project and overwrite the whole system folder.
This should fix your problem.

Categories