Reputation: 684
Got a problem with codeigniter with exteding the core. I build a website local and it workst perfect. Even when checking out on new machine or diferent php version ( tested on 5.3 and 5.2 ) it works normal. But when i upload it to my server it doesnt load the files in application/core. I get the error message:
Fatal error: Class 'LEAN_Controller' not found in /var/www/vhosts/website/subdomains/w8systeem/httpdocs/application/controllers/wachtlijsten/overzicht.php on line 3
When i ouput the loaded files like so:
print_r(get_included_files());
i get these results: localhost:
Array ( [0] => C:\wamp\www\website\index.php [1] =>
C:\wamp\www\website\system\core\CodeIgniter.php [2] =>
C:\wamp\www\website\system\core\Common.php [3] =>
C:\wamp\www\website\application\config\constants.php [4] =>
C:\wamp\www\website\system\core\Benchmark.php [5] =>
C:\wamp\www\website\application\config\config.php [6] =>
C:\wamp\www\website\system\core\Hooks.php [7] =>
C:\wamp\www\website\system\core\Config.php [8] =>
C:\wamp\www\website\system\libraries\Log.php [9] =>
C:\wamp\www\website\system\core\Utf8.php [10] =>
C:\wamp\www\website\system\core\URI.php [11] =>
C:\wamp\www\website\system\core\Router.php [12] =>
C:\wamp\www\website\application\config\routes.php [13] =>
C:\wamp\www\website\system\core\Output.php [14] =>
C:\wamp\www\website\application\config\mimes.php [15] =>
C:\wamp\www\website\system\core\Security.php [16] =>
C:\wamp\www\website\system\core\Input.php [17] =>
C:\wamp\www\website\system\core\Lang.php [18] =>
C:\wamp\www\website\system\core\Controller.php [19] =>
C:\wamp\www\website\application\core\lean_controller.php [20] =>
C:\wamp\www\website\application\controllers\wachtlijsten\overzicht.php )
server:
Array ( [0] => /var/www/vhosts/website/subdomains/w8systeem/httpdocs/index.php [1] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/CodeIgniter.php [2] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Common.php [3] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/application/config/constants.php [4] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Benchmark.php [5] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/application/config/config.php [6] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Hooks.php [7] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Config.php [8] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/libraries/Log.php [9] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Utf8.php [10] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/URI.php [11] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Router.php [12] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/application/config/routes.php [13] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Output.php [14] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/application/config/mimes.php [15] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Security.php [16] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Input.php [17] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Lang.php [18] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/system/core/Controller.php [19] =>
/var/www/vhosts/website/subdomains/w8systeem/httpdocs/application/controllers/wachtlijsten/overzicht.php )
I'm out of ideas. Dont know where to search further..
Upvotes: 0
Views: 2639
Reputation: 205
C:\wamp\www\website\application\core\lean_controller.php
should be
C:\wamp\www\website\application\core\LEAN_Controller.php
Linux is case sensitive, windows is not
Upvotes: 0
Reputation: 576
Check your code igniter version. I had a similar issue today where core mods weren't being picked up (< 2.0). I'm in the middle of migrating at the moment.
Upvotes: 0
Reputation: 3582
By default, CodeIgniter only loads core files that start with 'CI_', to change this, as yours starts with 'LEAN_', you need to change the following line in config/config.php:
$config['subclass_prefix'] = 'CI_';
to
$config['subclass_prefix'] = 'LEAN_';
Upvotes: 1