• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lost session

#31
Just to throw in a few more random variables into the mix...

I'm on PHP 7.3 & CI 4.0.0-rc.3 (and experienced a similar problem on CI 4.0.0-rc2 too)- whereby, if the user mistypes the address and the rerouting doesn't work out where to send the request, CI automatically redirects to the 404 error page... and every bit of session data seems to disappear.

I've not spent a lot of time trying to work out what's happening, though sessions have been working without a problem (without me having had to fiddle with any of the settings (so everything is as it came/default/out the box))...

Here's another bit of useless chaff, that will probably only muddy the water... if I remember correctly, I believe I previously experienced the same problem of losing session data when using the redirect() command in my code... but manage to side-step the issue at the time by using other ways to call the new page (without using the redirect() command directly).

Undecided
Reply

#32
(11-04-2019, 09:35 AM)Gary Wrote: if I remember correctly, I believe I previously experienced the same problem of losing session data when using the redirect() command in my code... but manage to side-step the issue at the time by using other ways to call the new page (without using the redirect() command directly).

I too am using out-ofbox settings and session data could be picked up in other php files of my app until I started to use a redirect() when I found all
 session data was lost in the redirected page.

I read about alternative redirect way to side-step issue and tried the header('Location...) solution but that also didn't work. I'm using PHP 7.4.5 and CI4.

Any advice welcome - thanks.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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