Welcome Guest, Not a member yet? Register   Sign In
What causes session loss on staging server?
#1

The staging server, running on PHP 7.4, is experiencing an issue with the session after logging in and redirecting to the home page. The session becomes lost or null.

The system utilizes CodeIgniter (CI) 3.0.6, with the configuration setting $config['sess_driver'] = 'database';.

It's worth mentioning that I can successfully log in and redirect without any problems on my local server (PHP 7.4) and the production server (PHP 7.0).

To address the issue, I have attempted two solutions:

Updating the php.ini file by changing session.auto_start from 0 to 1.
Modifying the CI Session.php file by replacing ini_set('session.name', $params['cookie_name']); with ini_set('session.id', $params['cookie_name']);.
Unfortunately, neither of these solutions has resolved the problem. Furthermore, it has been discovered that the ci_sessions table in the database does not have any data being inserted into it.
Reply
#2

I recommend you use at least the latest version of CI3. That is v3.1.13.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB