fmpros Posted August 8, 2012 Share Posted August 8, 2012 Hi Guys, I've got a login script that works fine on my desktop browsers and android phone but it does not work on iOS. More specifically, the session variables are not saved. All of my pages after the login script start with: if(!session_id()) session_start(); When I echo the variables on the page, they are empty when using iOS. Any ideas would be greatly appreciated! Thanks, John Link to comment https://forums.phpfreaks.com/topic/266795-problems-with-ios-and-sessions/ Share on other sites More sharing options...
Porl123 Posted August 8, 2012 Share Posted August 8, 2012 I'm just splitballing here, but you could try: if(session_id() == "") session_start(); or if(!isset($_SESSION)) session_start(); Link to comment https://forums.phpfreaks.com/topic/266795-problems-with-ios-and-sessions/#findComment-1367706 Share on other sites More sharing options...
fmpros Posted August 8, 2012 Author Share Posted August 8, 2012 Thanks Porl, I'll give that a try. It gets more peculiar. I've tested this on three iOS devices. It works on my fiance's iPhone, but not on the other two. iOS version is the same I believe. Maybe there is a setting? IDK, I'm an android guy myself. I'll tinker and see what I can find out. I'm just splitballing here, but you could try: if(session_id() == "") or if(!isset($_SESSION)) session_start(); Link to comment https://forums.phpfreaks.com/topic/266795-problems-with-ios-and-sessions/#findComment-1367715 Share on other sites More sharing options...
fmpros Posted August 8, 2012 Author Share Posted August 8, 2012 Ok, I feel a bit silly but at least I caught it. Cookies were disabled on the offending iOS devices and yes, I realize that this was not an OS issue . Thanks. Link to comment https://forums.phpfreaks.com/topic/266795-problems-with-ios-and-sessions/#findComment-1367719 Share on other sites More sharing options...
peipst9lker Posted August 8, 2012 Share Posted August 8, 2012 Edit: Nevermind, I was blind Link to comment https://forums.phpfreaks.com/topic/266795-problems-with-ios-and-sessions/#findComment-1367755 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.