dongshengyin0147 2016-01-29 12:33
浏览 369

session_start()导致CodeIgniter 3.0出现问题

I have a problem with the CAS authentication library in CI3. In CI2.x worked perfectly but with the CI3, the session has been re-designed and it seems to have problems with this library.

This is the error I get:

A PHP Error was encountered

Severity: Runtime Notice

Message: session_start() [function.session-start]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead

Filename: CAS/Client.php



A PHP Error was encountered

Severity: Error

Message: session_start() [function.session-start]: Failed to initialize storage module: user (path: C:\Windows\Temp)

Filename: CAS/Client.php

Here is my config.php settings:

$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

Note that I'm using a table called 'ci_sessions' in my database to store the session as stated in the CI3 user manual. It works perfectly but once I load the CAS library I get the previous error in the session_start() line.

CAS library extra info https://github.com/eliasdorneles/code-igniter-cas-library Someone wrote a code for easily integrate phpCAS into Codeigniter 2.X but it is no longer mantained nor updated to CI3.

For me, it is mandatory to use the CAS authentication method, any ideas on how to fix this error or use another alternative CAS client?

Thank you very much.

  • 写回答

2条回答 默认 最新

  • doubianyan9749 2016-01-29 12:55
    关注

    This is only indirectly connected to the session functions. Update your php.ini with a timezone:

    [Date]
    ; Defines the default timezone used by the date functions
    ; http://php.net/date.timezone
    date.timezone = Europe/Berlin
    
    评论

报告相同问题?

悬赏问题

  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线