使用3.0的session,linux下提示找不到session
Unable to load the requested class: session我是在ci 2.1的基础上,把ci 3.0的session cache driver模块替换掉了。
然后在 windows 下一切测试正常。
更新到 linux 服务器下,提示 “Unable to load the requested class: session”
看目录结构,3.0的session.php移到了 Session/Session.php
不知道哪里出问题了。
windows的php是 3.3.10
linux的php是 3.3.3 估计是大小写的问题,于是修改了 Loader.php 似乎有效。
暂时没有更新服务器,有待测试
1, 增加了ucfirst
public function is_loaded($class)
{
if (isset($this->_ci_classes))
{
return $this->_ci_classes;
}
return FALSE;
}
2,strtolower 改成 ucfirst
if ($subdir == '')
{
// $path = strtolower($class).'/'.$class;
$path = ucfirst($class).'/'.$class;
return $this->_ci_load_class($path, $params);
}
// If we got this far we were unable to find the requested class.
// We do not issue errors if the load call failed due to a duplicate request
if ($is_duplicate == FALSE)
{
log_message('error', "Unable to load the requested class : ".$class);
show_error("Unable to load the requested class : ".$class);
} 将php.ini中的
session.auto_start = 0
更改为
session.auto_start = 1
页:
[1]