• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI4 - session not persisting

#1
I just uploaded a test site on an ubuntu server and it seems that session data is not being persistent.

e.g. mydomain/home/test/?ds=set&key=name&val=xyz would print the $ss with the value of key and val. However, I back to mydomain /home/test without ds=set querystring - it should print the session value set in the previous request but its empty.

Code:
   $ds = $this->request->getGet('ds');
   $key = $this->request->getGet('key');
   $val = $this->request->getGet('val');
   if($ds == 'set') {
       $data[$key] = $val;
       session()->set($data);
       }
       $ss = session()->get();
   print_r($ss);

I cleared all files from writable/session folder and if I refresh site page it creates a session file in there. I also noticed that every page refresh creates a new session file in this folder. I am not sure what's going wrong here. Is this a permissions issue?
The session file (in writable/session folder) has permission 600 i.e. group has read/write.

Is that causing an issue? I am not sure. How do I fix it?
Reply


Messages In This Thread
CI4 - session not persisting - by happyape - 10-18-2018, 10:08 AM
RE: CI4 - session not persisting - by donpwinston - 10-18-2018, 01:16 PM
RE: CI4 - session not persisting - by happyape - 10-18-2018, 11:52 PM
RE: CI4 - session not persisting - by happyape - 10-19-2018, 06:49 AM
RE: CI4 - session not persisting - by sv3tli0 - 10-19-2018, 06:58 AM
RE: CI4 - session not persisting - by happyape - 10-19-2018, 07:06 AM
RE: CI4 - session not persisting - by happyape - 10-19-2018, 07:51 AM
RE: CI4 - session not persisting - by puschie - 10-22-2018, 06:16 AM
RE: CI4 - session not persisting - by happyape - 10-23-2018, 01:12 AM
RE: CI4 - session not persisting - by InsiteFX - 10-23-2018, 03:44 AM
RE: CI4 - session not persisting - by happyape - 10-23-2018, 05:40 AM
RE: CI4 - session not persisting - by InsiteFX - 10-23-2018, 08:31 AM
RE: CI4 - session not persisting - by happyape - 10-23-2018, 10:09 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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