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 python变量和列表之间的相互影响
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)