I’m wondering why there’s a difference in these two for sessions? If i have a login form and it passes sessions to a page (ie: settings.php). If i have localhost/settings.php the session would work, if I go to a different page and come back. but if it is 127.0.0.1/settings.php, the session will work on the first pass, then if I redirect somewhere else and go back, its not there anymore.
Does this happen to other people too? Or is this just me?
Thanks
Maybe this will help:
http://www.issociate.de/board/post/179979/Cookie_Problems_on_Localhost.html
and 127.0.0.1 != localhost for browser. browser will not send cookie that was set from 127.0.0.1 to localhost, because they are different domains.
p.s. in practice, there can be many domains on one ip. and for security reasons, of course, browser can’t send all cookies altogether (imagine, that cookies from your website could be sent by browser to all websites on virtualhosting with the same ip).