Welcome Guest, Not a member yet? Register   Sign In
Session library throws exception indicating ignoring app's session storage configurat
#1

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?
Reply
#2

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

CodeIgniter 3.2 Development Version.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB