Jon Hill wrote:
I have a site that has session.use_trans_sid = 1.
It seems that the first time I visit a page when I open up my browser, URLs are getting rewritten even though a cookie IS being set. If I refresh or move on to another page, the problem goes away, i.e. no more session ids appended to URLs.


I don't want to turn off trans_sid for this site because I want people to able to use it without cookies being set.

When you first hit a page that creates a cookie, the cookie is not accessible to the application until the page is refreshed or you browse to another page in the same domain. This is why the SID is showing up in the URL when you first hit the site. Though the cookie is being saved to the browser, the application cannot yet access it until you browse to another page.


Read up on it here: <http://www.php.net/setcookie>
In particular: "Cookies will not become visible until the next loading of a page that the cookie should be visible for."


--
Ben Ramsey
Zend Certified Engineer
http://benramsey.com

---------------------------------------------------
Atlanta PHP - http://www.atlphp.org/
The Southeast's premier PHP community.
---------------------------------------------------

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to