Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

_Ruud_'s avatar

Sessions not working on iOS - Session Driver type Database not working either

My sessions, which are set on file-based, are working fine on Windows and Android-based devices, but on iOS, the sessions don't seem to work. The users are logged-out immediately.

On SO I have seen similiar issues and the recommendation there was to switch to the database driver. So I ran the session migration, change the config, cleared the cache, but somehow the initial session record isn't created in the database.

I checked it with Telescope, I see the update queries for the sessions, but I can't find any insert query or an error about it.

What am I missing here? Anyone an idea on how to either:

a - Fix the iOS session issue b - or fix the session database driver (if that even is a solution for the iOS problem)

I checked the error, access logs and Telescope, but I can't find any error on either issue.

0 likes
4 replies
aurawindsurfing's avatar

Hey @ruud

If you have mac, you can plug in your phone and run debug mode from safari on osx. It can then spit out all errors for you to debug it. No idea to be honest why it would not work on ios?

_Ruud_'s avatar

Unfortunately, I don't have an iMac or even an iPhone at hand here. I am testing it on an iPad for now after getting some feedback from a user.

I figured it may be a cookie related issue on iOS. I also tried chrome on the iPad instead of the default Safari browser, but that didn't work either.

oriolrg's avatar

How do yo do this session hanndling before redirect? I have the same problem but not found a solution. Tanks

Please or to participate in this conversation.