Hi everyone, I am having a problem in with PHP sessions. Most of the URLs i haved used in PHP are in the form http://www.example.com i.e include www in the url. But if someone types http://example.com in the address bar of the browser and logs in, i redirect them to http://www.example.com/account.php their session is lost. How can i resolve this
Session is lost when using ( or not using) www in the URL
Collapse
X
-
-
Heya, rizwan6feb.
My first guess is that your session cookie is restricted to the www subdomain.
Look at your php.ini file's session cookie settings (http://php.net/manual/en/session.con....cookie_domain) and see if you need to adjust it (probably from '' to '.myweb.com').Comment
-
Originally posted by pbmodsHeya, rizwan6feb.
My first guess is that your session cookie is restricted to the www subdomain.
Look at your php.ini file's session cookie settings (http://php.net/manual/en/session.con....cookie_domain) and see if you need to adjust it (probably from '' to '.myweb.com').
Thanks, sorry for late response
session.cookie_ domain variable is set to 'no value'Comment
-
-
Comment