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?
Related
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.
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.
I am getting this error for a small module that I am trying to develop:
Fatal error: Call to undefined method car_booking::getMenu() in
/var/www/html/mis_mishra/application/core/MY_Controller.php on line 67
The same is working fine for other module. I have checked from my side that the case is ok, module is available menu is coming perfectly alright when the module start. unable to trace the reason.
How can I solve this error?
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.
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.