I am updating apache From 2.2.19.0 to 2.4.16.0 As well as php From 5.3.7.0 to 5.6.12.0 now I get this error:
Fatal error: class 'CI_Controller' was not found in the system \ core \ CodeIgniter.php on line 234
CodeIgniter.php line 221-235
require BASEPATH.'core/Controller.php';
function &get_instance()
{
return CI_Controller::get_instance();
}
Full CodeIgniter.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
define('CI_VERSION', '3.0-dev');
require_once(BASEPATH.'core/Common.php');
if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants.php'))
{
require(APPPATH.'config/'.ENVIRONMENT.'/constants.php');
}
else
{
require(APPPATH.'config/constants.php');
}
set_error_handler('_exception_handler');
if ( ! is_php('5.4'))
{
@ini_set('magic_quotes_runtime', 0);
}
if ( ! empty($assign_to_config['subclass_prefix']))
{
get_config(array('subclass_prefix' => $assign_to_config['subclass_prefix']));
}
$BM =& load_class('Benchmark', 'core');
$BM->mark('total_execution_time_start');
$BM->mark('loading_time:_base_classes_start');
$EXT =& load_class('Hooks', 'core');
$EXT->_call_hook('pre_system');
$CFG =& load_class('Config', 'core');
if (isset($assign_to_config) && is_array($assign_to_config))
{
foreach ($assign_to_config as $key => $value)
{
$CFG->set_item($key, $value);
}
}
$UNI =& load_class('Utf8', 'core');
$URI =& load_class('URI', 'core');
$RTR =& load_class('Router', 'core');
$RTR->_set_routing();
if (isset($routing))
{
$RTR->_set_overrides($routing);
}
$OUT =& load_class('Output', 'core');
if ($EXT->_call_hook('cache_override') === FALSE
&& $OUT->_display_cache($CFG, $URI) === TRUE)
{
exit;
}
$SEC =& load_class('Security', 'core');
$IN =& load_class('Input', 'core');
$LANG =& load_class('Lang', 'core');
require BASEPATH.'core/Controller.php';
function &get_instance()
{
return CI_Controller::get_instance();
}
if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'))
{
require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php';
}
if ( ! file_exists(APPPATH.'controllers/'.$RTR->directory.$RTR->class.'.php'))
{
show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
}
include(APPPATH.'controllers/'.$RTR->directory.$RTR->class.'.php');
$BM->mark('loading_time:_base_classes_end');
$class = $RTR->class;
$method = $RTR->method;
if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
{
if ( ! empty($RTR->routes['404_override']))
{
if (sscanf($RTR->routes['404_override'], '%[^/]/%s', $class, $method) !== 2)
{
$method = 'index';
}
if ( ! class_exists($class, FALSE))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
}
}
else
{
show_404($class.'/'.$method);
}
}
if (method_exists($class, '_remap'))
{
$params = array($method, array_slice($URI->rsegments, 2));
$method = '_remap';
}
else
{
if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($class)), TRUE))
{
if (empty($RTR->routes['404_override']))
{
show_404($class.'/'.$method);
}
elseif (sscanf($RTR->routes['404_override'], '%[^/]/%s', $class, $method) !== 2)
{
$method = 'index';
}
if ( ! class_exists($class, FALSE))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
}
}
$params = array_slice($URI->rsegments, 2);
}
$EXT->_call_hook('pre_controller');
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start');
$CI = new $class();
$EXT->_call_hook('post_controller_constructor');
call_user_func_array(array(&$CI, $method), $params);
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end');
$EXT->_call_hook('post_controller');
if ($EXT->_call_hook('display_override') === FALSE)
{
$OUT->_display();
}
$EXT->_call_hook('post_system');
Full Controller.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class CI_Controller {
private static $instance;
public function __construct()
{
self::$instance =& $this;
foreach (is_loaded() as $var => $class)
{
$this->$var =& load_class($class);
}
$this->load =& load_class('Loader', 'core');
$this->load->initialize();
log_message('debug', "Controller Class Initialized");
}
public static function &get_instance()
{
return self::$instance;
}
}
is it possible due to htaccess?
Hint: I search on the site, on google and ... but I do not get any solution, I spend my time on 2 days .: - (