php - session changes on page refresh -


maybe i'm misunderstanding this, expect following return same session id on page refresh;

<?php session_start(); $ses_id = session_id(); echo $ses_id; ?> 

whenever refresh page, session id updates new one. i'm running php on windows 7 iis. client iphone safari browser.

initially trying trace problem ajax call , session variables, in troubleshooting realised calling page couldn't retain it's own session during page refresh - figure if fix this, @ least can start troubleshooting ajax issue, if it's still there.

what i've done;

php ini - confirmed sessions enabled following settings (mostly default except session.save_path "/tmp" , session.cookie_domain blank...

session.save_handler = files session.save_path = "c:\windows\temp" session.use_cookies = 1 session.use_only_cookies = 1 session.name = phpsessid session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = .<mydomain.com>  --  <censored> :) 

...

thanks @arpit oddly vague comment nonetheless pointed me in right direction :)

changed:
iphone -> settings -> safari -> accept cookies -> never

to

iphone -> settings -> safari -> accept cookies -> visited

and session stays same.
not great app though; have ask users change safari settings.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -