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

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 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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示