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 用三极管设计—个共射极放大电路
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示