Session.use_trans_sid Stays On?

liunx

Guest
My first script using session:<br /><br /><?php<br />session_start();<br />echo ini_get('session.use_trans_sid') . "<br>";<br />?><br /><a href=http://www.totalchoicehosting.com/forums/lofiversion/index.php/"page2.php">continue</a><br /><br />To my surprise, the ini_get returns 1, and the <a> target receives a PHPSESSID=...... query string. <br /><br />Same after adding:<br /><br />ini_set('session.use_only_cookies',"1");<br /><br />So I check the phpinfo(). Even more mysterious to me:<br /><br /><a href="http://www.totalchoicehosting.com/help/info.php" target="_blank">http://www.totalchoicehosting.com/help/info.php</a><br />says it is off (and "only cookie" on),<br />but phpinfo() running on my server it says otherwise (sid on, only cookie off).<br /><br />Why?<br /><br />Since the trans_sid is a "PHP_INI_SYSTEM" setting, does it mean I have no way to disable it?<br /><br />Why is the system set this way?<!--content-->
If you want to turn it off, just put the following line in your .htaccess file:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->php_value session.use_trans_sid Off<!--c2--></div><!--ec2--><!--content-->
Ah! it can be turned off after all. Thanks <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
 
Back
Top