[thelist] session_name ('whatever')

misterhaan misterhaan at track7.org
Tue Mar 13 15:09:21 CDT 2007


Bob Meetin wrote:
> Is there a way to disable displaying the variables without breaking the 
> functionality?  Or is that way sites commonly set up administration 
> under an admin directory, making it less apparent?  Or of course have I 
> done something else wrong?
>
> The other odd thing - once I have selected one of the links (without 
> being logged in) such as hitting 'Home' twice, the session variables 
> will eventually cease display.  But again - nothing breaks. If you opt 
> to login all is fine in Mayberry
if the browser hasn't accepted the session cookie, then php by default 
puts it in the query string for every link, which as you already know 
looks stupid.  the first time you load a page, the browser doesn't have 
a session cookie yet, so php has no way of knowing if it's going to 
accept the session cookie, which is why it puts the session id on every 
link (to make sessions still work even without cookies).  after you 
click a link, if your browser accepted the cookie php should notice that 
the browser sent a session cookie and stop messing with the links (at 
least until the cookie expires).

you can tell php not to mess with links in the first place, since most 
people will accept cookies:  just set session.use_trans_sid to false.



More information about the thelist mailing list