Php Sessions -- Raul

liunx

Guest
Hey Raul. I'm back for a new round of PHP!<br /><br />Ok, so here's the thing. I've got sessions running on all my websites on every page load. My main site is <a href="http://www.omgn.com/" target="_blank">OMGN</a>. As you can see, it automatically appends the SID into any links.<br /><br />I did some looking around on the php.net website and found that it can be configured to turn off appending the ID and just using cookies to do the session management. I want to turn this off for a variety of reasons, but my top 2 are:<br /><br />1) Security risks and oddities when users see those things.<br />2) Google can't accurately serve up advertisements on a page that has a session ID appended.<br /><br />How do I turn off the automatic appendation of the ID on links and tell it to use only cookies? The session.use_only_cookies variable controls it in php.ini, but I need to activate that variable for my website... It obviously isn't activated on TCH.<!--content-->
Never mind. I got it:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->php_value session.use_trans_sid 0<!--c2--></div><!--ec2--><br /><br />Used that in HTACCESS. Works like a charm!<!--content-->
Aw heck I would have been thrilled with this a few weeks ago, but I got rid of that script... *sighs*. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><!--content-->
So get it back so you can use what I've discovered! lol<!--content-->
Glad you got it working, Robert <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />One question: did you think about the possibility of someone not having cookies enabled?<!--content-->
<!--QuoteBegin-TCH-Raul+May 13 2004, 08:57 AM--><div class='quotetop'>QUOTE(TCH-Raul @ May 13 2004, 08:57 AM)</div><div class='quotemain'><!--QuoteEBegin-->One question: did you think about the possibility of someone not having cookies enabled?<!--QuoteEnd--></div><!--QuoteEEnd--><br /> I know I did before I took out sid's....<br /><br />And I say **** 'em! <br /><br />(hehe... cept I'm not kidding.. they can still read it, they just can't reply... thank god)<!--content-->
Yeah, I thought about people not having cookies enabled... I guess that means they'll have a tougher time viewing my site. I'm willing to take that risk in order to promote website security and better URLs.<!--content-->
Yep, in the end I decided to scrap the session IDs for my site to. So far I have only had one person refuse to come back over it. The dangers far outway to benefits.<br /><br />One thing I do need to work on is a warning msg telling the user there login failed because cookies were turned off.<!--content-->
My sessions run on every page load for different reasons, even if they're not logged in.<!--content-->
 
Back
Top