2

After successful login, I am saving certain values in session and then redirect users to dashboard from there they can create different products. On product create page session is reset and all stored values are erased. This is issue is only occurring in Safari(macOS Sierra). On other browser like chrome and Firefox it works fine.

I have checked PHP session files in the server directory and when user navigate to product create page then it create new session file(with empty information) which shows that somehow existing session has destroyed or reset. I assume that might be due to cookie settings or server configuration but after applying different solution over the web(CodeIgniter IE not storing sessions correctly), still issue persist.

Any help would be greatly appreciated.

Following is the session data:

__ci_last_regenerate|i:1548851531;isLoggedIn|b:1;userInfo|s:3844:"O:4:"User":12:{s:16:" User _sessionId";s:26:"ojj9ki6teco564376ecf3p2e90";s:15:" User _username";s:14:"testing.inspector";s:15:" User _password";s:3:"XXX";s:12:" User _roles";a:1:{i:0;O:8:"stdClass":2:{s:2:"id";s:36:"4be88255-3317-7c4a-e05b-5beaa823da16";s:4:"name";s:9:"Inspector";}}s:6:"active";i:1;s:8:"verified";i:1;s:15:" * _module_name";s:5:"Users";s:6:" * _id";s:36:"4538da34-d98c-60e9-f8cf-5c24f6d9e205";s:4:"_raw";O:8:"stdClass":4:{s:2:"id";s:26:"ojj9ki6teco564376ecf3p2e90";s:11:"module_name";s:5:"Users";s:15:"name_value_list";O:8:"stdClass":21:{s:7:"user_id";O:8:"stdClass":2:{s:4:"name";s:7:"user_id";s:5:"value";s:36:"4538da34-d98c-60e9-f8cf-5c24f6d9e205";}s:9:"user_name";O:8:"stdClass":2:{s:4:"name";s:9:"user_name";s:5:"value";s:14:"testing.inspector";}s:9:"full_name";O:8:"stdClass":2:{s:4:"name";s:9:"full_name";s:5:"value";s:14:"testing Inspector";}s:6:"mobile";O:8:"stdClass":2:{s:4:"name";s:6:"mobile";s:5:"value";s:10:"3175137803";}s:5:"state";O:8:"stdClass":2:{s:4:"name";s:5:"state";s:5:"value";s:6:"Alaska";}s:5:"email";O:8:"stdClass":2:{s:4:"name";s:5:"email";s:5:"value";s:28:"testteam@gmail.com";}s:8:"zip_code";O:8:"stdClass":2:{s:4:"name";s:8:"zip_code";s:5:"value";s:5:"86543";}s:7:"address";O:8:"stdClass":2:{s:4:"name";s:7:"address";s:5:"value";s:0:"";}s:4:"city";O:8:"stdClass":2:{s:4:"name";s:4:"city";s:5:"value";s:0:"";}s:5:"photo";O:8:"stdClass":2:{s:4:"name";s:5:"photo";s:5:"value";s:36:"4538da34-d98c-60e9-f8cf-5c24f6d9e205";}s:13:"user_language";O:8:"stdClass":2:{s:4:"name";s:13:"user_language";s:5:"value";s:5:"en_us";}s:16:"user_currency_id";O:8:"stdClass":2:{s:4:"name";s:16:"user_currency_id";s:5:"value";s:0:"";}s:13:"user_is_admin";O:8:"stdClass":2:{s:4:"name";s:13:"user_is_admin";s:5:"value";b:0;}s:20:"user_default_team_id";O:8:"stdClass":2:{s:4:"name";s:20:"user_default_team_id";s:5:"value";N;}s:23:"user_default_dateformat";O:8:"stdClass":2:{s:4:"name";s:23:"user_default_dateformat";s:5:"value";s:5:"m/d/Y";}s:23:"user_default_timeformat";O:8:"stdClass":2:{s:4:"name";s:23:"user_default_timeformat";s:5:"value";s:3:"H:i";}s:21:"user_number_seperator";O:8:"stdClass":2:{s:4:"name";s:21:"user_number_seperator";s:5:"value";s:1:",";}s:22:"user_decimal_seperator";O:8:"stdClass":2:{s:4:"name";s:22:"user_decimal_seperator";s:5:"value";s:1:".";}s:23:"mobile_max_list_entries";O:8:"stdClass":2:{s:4:"name";s:23:"mobile_max_list_entries";s:5:"value";N;}s:27:"mobile_max_subpanel_entries";O:8:"stdClass":2:{s:4:"name";s:27:"mobile_max_subpanel_entries";s:5:"value";N;}s:18:"user_currency_name";O:8:"stdClass":2:{s:4:"name";s:18:"user_currency_name";s:5:"value";s:10:"US Dollars";}}s:5:"roles";a:1:{i:0;r:6;}}s:10:" * _params";a:3:{s:8:"username";s:14:"testing.inspector";s:8:"password";s:3:"XXX";s:11:"module_name";s:5:"Users";}s:22:" BexaModel _datasource";O:14:"SuiteConnector":13:{s:21:" SuiteConnector _host";s:91:"http://example.com/rest.php";s:25:" SuiteConnector _username";s:5:"admin";s:25:" SuiteConnector _password";s:8:"XXXXX";s:20:" SuiteConnector _ssl";b:0;s:24:" SuiteConnector _payload";s:0:"";s:28:" SuiteConnector _queryParams";a:5:{s:6:"method";s:5:"login";s:10:"input_type";s:4:"JSON";s:13:"response_type";s:4:"JSON";s:10:"session_id";N;s:9:"rest_data";s:104:"{"user_auth":{"user_name":"testing.inspector","password":"202cb962ac59075b964b07152d234b70","version":"1"}}";}s:30:" SuiteConnector _requestMethod";s:3:"GET";s:23:" SuiteConnector _method";s:5:"login";s:25:" SuiteConnector _response";s:0:"";s:26:" SuiteConnector _sessionId";N;s:23:" SuiteConnector _userId";N;s:25:" SuiteConnector _userRole";N;s:26:" SuiteConnector _systemAPI";a:6:{i:0;s:19:"arello_verification";i:1;s:11:"set_entries";i:2;s:13:"verify_number";i:3;s:11:"verify_code";i:4;s:14:"get_entry_list";i:5;s:0:"";}}s:16:"_name_value_list";r:16;}";auth|a:3:{s:4:"user";a:5:{s:5:"class";s:6:"MyUser";s:6:"entity";O:4:"User":12:{s:16:" User _sessionId";s:26:"ojj9ki6teco564376ecf3p2e90";s:15:" User _username";s:14:"testing.inspector";s:15:" User _password";s:3:"XXX";s:12:" User _roles";a:1:{i:0;O:8:"stdClass":2:{s:2:"id";s:36:"4be88255-3317-7c4a-e05b-5beaa823da16";s:4:"name";s:9:"Inspector";}}s:6:"active";i:1;s:8:"verified";i:1;s:15:" * _module_name";s:5:"Users";s:6:" * _id";s:36:"4538da34-d98c-60e9-f8cf-5c24f6d9e205";s:4:"_raw";O:8:"stdClass":4:{s:2:"id";s:26:"ojj9ki6teco564376ecf3p2e90";s:11:"module_name";s:5:"Users";s:15:"name_value_list";O:8:"stdClass":21:{s:7:"user_id";O:8:"stdClass":2:{s:4:"name";s:7:"user_id";s:5:"value";s:36:"4538da34-d98c-60e9-f8cf-5c24f6d9e205";}s:9:"user_name";O:8:"stdClass":2:{s:4:"name";s:9:"user_name";s:5:"value";s:14:"testing.inspector";}s:9:"full_name";O:8:"stdClass":2:{s:4:"name";s:9:"full_name";s:5:"value";s:14:"testing Inspector";}s:6:"mobile";O:8:"stdClass":2:{s:4:"name";s:6:"mobile";s:5:"value";s:10:"3175137803";}s:5:"state";O:8:"stdClass":2:{s:4:"name";s:5:"state";s:5:"value";s:6:"Alaska";}s:5:"email";O:8:"stdClass":2:{s:4:"name";s:5:"email";s:5:"value";s:28:"testteam@gmail.com";}s:8:"zip_code";O:8:"stdClass":2:{s:4:"name";s:8:"zip_code";s:5:"value";s:5:"86543";}s:7:"address";O:8:"stdClass":2:{s:4:"name";s:7:"address";s:5:"value";s:0:"";}s:4:"city";O:8:"stdClass":2:{s:4:"name";s:4:"city";s:5:"value";s:0:"";}s:5:"photo";O:8:"stdClass":2:{s:4:"name";s:5:"photo";s:5:"value";s:36:"4538da34-d98c-60e9-f8cf-5c24f6d9e205";}s:13:"user_language";O:8:"stdClass":2:{s:4:"name";s:13:"user_language";s:5:"value";s:5:"en_us";}s:16:"user_currency_id";O:8:"stdClass":2:{s:4:"name";s:16:"user_currency_id";s:5:"value";s:0:"";}s:13:"user_is_admin";O:8:"stdClass":2:{s:4:"name";s:13:"user_is_admin";s:5:"value";b:0;}s:20:"user_default_team_id";O:8:"stdClass":2:{s:4:"name";s:20:"user_default_team_id";s:5:"value";N;}s:23:"user_default_dateformat";O:8:"stdClass":2:{s:4:"name";s:23:"user_default_dateformat";s:5:"value";s:5:"m/d/Y";}s:23:"user_default_timeformat";O:8:"stdClass":2:{s:4:"name";s:23:"user_default_timeformat";s:5:"value";s:3:"H:i";}s:21:"user_number_seperator";O:8:"stdClass":2:{s:4:"name";s:21:"user_number_seperator";s:5:"value";s:1:",";}s:22:"user_decimal_seperator";O:8:"stdClass":2:{s:4:"name";s:22:"user_decimal_seperator";s:5:"value";s:1:".";}s:23:"mobile_max_list_entries";O:8:"stdClass":2:{s:4:"name";s:23:"mobile_max_list_entries";s:5:"value";N;}s:27:"mobile_max_subpanel_entries";O:8:"stdClass":2:{s:4:"name";s:27:"mobile_max_subpanel_entries";s:5:"value";N;}s:18:"user_currency_name";O:8:"stdClass":2:{s:4:"name";s:18:"user_currency_name";s:5:"value";s:10:"US Dollars";}}s:5:"roles";a:1:{i:0;r:12;}}s:10:" * _params";a:3:{s:8:"username";s:14:"testing.inspector";s:8:"password";s:3:"XXX";s:11:"module_name";s:5:"Users";}s:22:" MyModelModel _datasource";O:14:"SuiteConnector":14:{s:21:" SuiteConnector _host";s:91:"http://example.com/rest.php";s:25:" SuiteConnector _username";s:5:"admin";s:25:" SuiteConnector _password";s:8:"XXXXX";s:20:" SuiteConnector _ssl";b:0;s:24:" SuiteConnector _payload";s:0:"";s:28:" SuiteConnector _queryParams";a:5:{s:6:"method";s:5:"login";s:10:"input_type";s:4:"JSON";s:13:"response_type";s:4:"JSON";s:10:"session_id";N;s:9:"rest_data";s:104:"{"user_auth":{"user_name":"testing.inspector","password":"202cb962ac59075b964b07152d234b70","version":"1"}}";}s:30:" SuiteConnector _requestMethod";s:3:"GET";s:23:" SuiteConnector _method";s:5:"login";s:25:" SuiteConnector _response";s:0:"";s:26:" SuiteConnector _sessionId";N;s:23:" SuiteConnector _userId";N;s:25:" SuiteConnector _userRole";N;s:26:" SuiteConnector _systemAPI";a:6:{i:0;s:19:"arello_verification";i:1;s:11:"set_entries";i:2;s:13:"verify_number";i:3;s:11:"verify_code";i:4;s:14:"get_entry_list";i:5;s:0:"";}s:19:" SuiteConnector _ci";N;}s:16:"_name_value_list";r:22;}s:8:"username";s:14:"testing.inspector";s:5:"roles";a:1:{i:0;s:4:"user";}s:11:"permissions";a:0:{}}s:9:"validated";b:1;s:19:"fully_authenticated";b:1;}username|s:14:"testing.inspector";password|s:3:"XXX";

RokiE
  • 53
  • 1
  • 9
  • how much data you stored in session? – Devsi Odedra Jan 30 '19 at 12:38
  • let me share complete dataset in the question. Thanks – RokiE Jan 30 '19 at 12:39
  • yes, because in some version of safari there is limit for storing data. – Devsi Odedra Jan 30 '19 at 12:40
  • 1
    _“which shows that somehow existing session has destroyed or reset”_ - not necessarily; in most cases that simply means the session ID was not send back with the request, so that a new, fresh sessions is created. The old one is most likely still “there” - but it doesn’t get accessed any more, _because_ the session ID has changed. I’d start by checking what parameters the session cookie gets set with, whether everything looks in order there, specifically regarding the parameters like domain & path. – 04FS Jan 30 '19 at 12:41
  • 1
    _“because in some version of safari there is limit for storing data”_ - that should only be relevant, if the actual data was stored on the client - which AFAIK none of the default session drivers CI provides does. – 04FS Jan 30 '19 at 12:43
  • @DevsiOdedra i have checked session file size on server and it is around 7KB. So does it create any issue safari then? I don't think so, if it does then how can i resolve this? – RokiE Jan 30 '19 at 12:48
  • @04FS good point, i think same that session id is not stored or send to server in next HTTP call and server consider that as new request. Somehow cookie are creating issue in this case but really I am not sure how to get this fix. Can you please help me to look and fix any specific location of the code for this? Thank you – RokiE Jan 30 '19 at 12:50
  • 1
    @RokiE yes only 7KB does not create any issue. – Devsi Odedra Jan 30 '19 at 12:53
  • As I said, I’d start by looking at which values that session cookie actually gets set with - meaning the actual Set-Cookie header your browser receives, can be checked in the network panel. Maybe something is off there regarding the domain or path, that could potentially trip Safari up. – 04FS Jan 30 '19 at 12:55
  • @RokiE paste your session data which you try to store here if possible. – Devsi Odedra Jan 30 '19 at 12:59
  • @DevsiOdedra session data has been posted to question body. Please have a look – RokiE Jan 30 '19 at 13:07
  • 1
    i think because of some type of data problem may be occure, once store some simple data like user id and then see that in safari that work or not. – Devsi Odedra Jan 30 '19 at 13:26
  • @DevsiOdedra issue is still occurring with limited data set. – RokiE Jan 31 '19 at 12:44

0 Answers0