phpsessioncodeigniter-3

session_start(): Failed to decode session object


I am sometime experiencing the following issue with CodeIgniter:

ERROR - 2019-03-05 19:57:26 --> Severity: Warning --> session_start(): Failed to decode session object. Session has been destroyed /system/libraries/Session/Session.php 143

This error appears in my server log and is impossible to artificialy replicate.

I already read the following SO questions:

I also asked on the CodeIgniter forum, but I didn't have any answer.

https://forum.codeigniter.com/thread-72960.html

Here are my session configuration (in application/config/config.php)

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

Any ideas what could be the roots of that problem and/or where to start ?


Solution

  • In application/config/config.php, set this value:

    $config['sess_save_path'] = sys_get_temp_dir();