CodeIgniter Forums
Session library throws exception indicating ignoring app's session storage configurat - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Session library throws exception indicating ignoring app's session storage configurat (/showthread.php?tid=79263)



Session library throws exception indicating ignoring app's session storage configurat - saascoder - 05-19-2021

Hi everyone, been using code ignitor for a few years and love it.   Still on v3.  First post for me.

We are getting this error message, on an app that is configured to store sessions in the database.

Code:
Exception: session_start(): Failed to read session data: user (path: /var/lib/php/sessions) /var/www/html/system/libraries/Session/Session.php 143
The relevant configuration file (

Code:
application/config/config.php
) contains this entry (and no other entry for 

Code:
'sess_driver'
):
Code:
$config['sess_driver'] = 'database';
This is happening in CodeIgniter 
Code:
3.1.11
 running on PHP 
Code:
7.3.27
, Ubuntu 
Code:
18.04.5 LTS
, and Apache 
Code:
2.4.46
.
Since the app is configured to store session data in the database, and this seems to work almost all of the time, I think this is an intermittent bug in CodeIgniter.
The line where it's crashing is on a call to PHP's built-in 

Code:
session_start
 function. This happens after some code that calls 

Code:
session_set_save_handler
. Based on my reading of this code, I would expect 

Code:
session_set_save_handler
 to have set up all of the required callbacks to ensure that 

Code:
session_start
 would succeed, and that does seem like what happens most of the time.
Has anyone else seen this bug? Are there any workarounds? Any other relevant information that I can gather?


RE: Session library throws exception indicating ignoring app's session storage configurat - InsiteFX - 05-19-2021

Try downloading the Developer version, some fixes around 2 months ago may solve your problem.

CodeIgniter 3.2 Development Version.