[CI3 session on Safari] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: [CI3 session on Safari] (/showthread.php?tid=63184) |
[CI3 session on Safari] - mdslab - 10-04-2015 I got a problem with the CodeIgniter session when users use Safari from PC or Tablet. On Google Chrome and Firefox Dev Edition is working perfectly i think the problem is related with Safari. That's my code for the session after the success log-in: $logged_in = array( 'username' => $out[0]['username'], 'user_id' => $out[0]['id'], 'logged_in' => TRUE ); $this->session->set_userdata($logged_in); $this->session->set_flashdata('user_data',$logged_in); redirect('social/userprofile/'.$out[0]['username']); Any suggestions? RE: [CI3 session on Safari] - sampoyigi - 10-04-2015 What is the problem you are having with session? RE: [CI3 session on Safari] - mdslab - 10-04-2015 The problem is: When a user make a login using Safari he is redirected again in the Log-In page instead the profile page. This because: $check_session = $this->session->userdata('user_id'); if(empty($check_session)) { redirect('social/index'); } During the Log-In i Set the session for the user. In Chrome and Firefox is all OK but on Safari the session is completely empty. RE: [CI3 session on Safari] - mdslab - 10-04-2015 I think the problem is Safari.. I'm saving the Session as files in a dir. The log-in with Chrome generate 1 session file with all the info, Safari generate 3 or more session files for same log-in 1 with the right information and the others with just: __ci_last_regenerate|i:1443966977; all files have same i:1443966977 but the only one with the right information saved have a different number. RE: [CI3 session on Safari] - mdslab - 10-04-2015 The same Code, on same server but just with different domain and CI Version 2.2 is working on Safari ! RE: [CI3 session on Safari] - sampoyigi - 10-04-2015 I'm not sure about this as i never experienced such problem before, but have you checked that your cookie_domain and cookie_path is set correctly. RE: [CI3 session on Safari] - Narf - 10-05-2015 Is sess_match_ip enabled? If so, disable it. |