duanchanguo7603
duanchanguo7603
2016-05-30 19:19
浏览 58
已采纳

Codeigniter文件Session.php不存在

I know that is a problem which have been answerd hundred times, but nothing works for me. When i upload web page on server i'm keep getting error The configuration file Session.php does not exist.

This is my config.php

$config['sess_driver'] = 'database';//enable session with db
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessions';//database table name
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

$config['encryption_key'] = 'pXeQY2733rR560MrwJy40OL4WaSGmr5A';
$config['base_url'] = 'http://myapp.com/';
$config['index_page'] = '';

My autoload file

$autoload['libraries'] = array('database', 'email', 'form_validation', 'session');
$autoload['helper'] = array('url', 'file', 'form');

Sql which i used for mysql table

CREATE TABLE IF NOT EXISTS `ci_sessions` (
        `id` varchar(40) NOT NULL,
        `ip_address` varchar(45) NOT NULL,
        `timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
        `data` blob NOT NULL,
        PRIMARY KEY (id),
        KEY `ci_sessions_timestamp` (`timestamp`)
);

enter image description here

So far i have tried/added
1. Change auto load session in to the Session
2. All controllers and models files/class names start with upper case
3. Added encryption_key

What else can i do guys? If you need any additional informations please let me know and i will provide. Thank you!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • drd2551
    drd2551 2016-05-30 19:30
    已采纳

    If you are on Unix/Linux, make sure to load your library with capital letters:

    $autoload['libraries'] = array('Session');

    If nothing works, download again and reinstall from new pack

    http://www.codeigniter.com/download

    点赞 评论

相关推荐