• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session Issues

#1
So I'm having a strange issue with sessions on one of my websites. Before getting into too much detail, I have two websites using the same CI version (3.1.10) configured exactly the same and both are also using PHP 7.2. Sessions are working perfectly fine on one, but not on the other. Upon using the browser debug tools, I see that on the site that is not working, the session is showing the full array instead of the session ID. The extent of the differences between both websites are the HTML, CSS, Domain, and DB credentials (shared VPS, same PHP INI, same DB version). Both domains use SSL.

Here is my session configuration in config.php:

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

In browser debug under storage (firefox) working website shows:

ci_session: "f89h3983hf89h389fh3" (ID isn't real, just wanted to show you what I see).

And website that has the issue shows:

ci_session: array 0 : "blah" 1 : "blah: 2 : "blah" (all the way up to...) 22 : "blah"

Funny part is that if I swap the DB configuration from the non-working site over to the working site and post information, it works without issue, which is what I've been doing to circumvent the issue in the interim. 

I turned on logging and there were no errors. Figured I'd just suck it up and ask for help because at this point I'm just spinning my wheels. Let me know if there is anything else I can provide that might shed some light on the issue.
Reply

#2
@zinzin112,

Is the directory permissions for session data set correctly? Do both versions of PHP have the same active features turned on? Are they both set the same?
Reply

#3
Did the session table - ci_sessions - get added to the non-working site's db?
Reply

#4
Are the config cookie settings also the same?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.