Welcome Guest, Not a member yet? Register   Sign In
New Session on every page load CI3.1.10 PHP7.2
#1

So this is a curious one, and I am somewhat confused.

I updated from CI 3.0.4 to CI 3.1.10, and from PHP 5.6 to 7.2.
I am running PHP through IIS fast CSG.

I have two local domains registered in my host file: app.local, test.app.local.

app.local is my Development instance,
test.app.local is my local testing instance which i use before deploying to live testing.

After upgrading, a couple of things broke, which was to be expected. but i got them all sorted out on my Dev instance, and everything worked fine.

I then deployed to my local test site. And what i found was that on every request to the server, a new session was being created.



PHP Code:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'appsession-testenv';
$config['sess_expiration'] = 7200;
$config['sess_use_database'] = true;
$config['sess_expire_on_close'] = true;
$config['sess_encrypt_cookie'] = true;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE

The only change in any configuration is the database credentials, and schema.

I then changed my dev environment to use the same PHP settings and configuration as the test environment, and everything continues to work.


I am hoping some people might have some insight on this??
Reply
#2

Never mind.

Turns outs, my deployment script didnt copy the new Code Igniter files??
no idea why, but a fresn copy of the Code Igniter 3.1.10 into the test instance seemed to fix all.
Reply
#3

(This post was last modified: 03-23-2019, 11:27 PM by nurahman11.)

Yeah same thing happened to me, CI 3.1.10 & PHP 7.1.26. Session gone after redirect into another controller or method. Still didnt have clue till now.

edit: mine has been solved. it was my fault for not read user guide completely.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB