PDA

View Full Version : links and sessions


jeromepelletier
06-01-2006, 09:55 PM
Sometimes my links i have show sessionID but most of the times they dont, how do i stop sessionid from showing in the links?

THanks.

mic2100
06-02-2006, 07:30 AM
have u got a example of the code for one of the links where it shows the session id and not. because i am not to sure what the cause may be and it may be in ur code sum where

jeromepelletier
06-02-2006, 12:22 PM
have u got a example of the code for one of the links where it shows the session id and not. because i am not to sure what the cause may be and it may be in ur code sum where
i just have the regular

print "<a href='somelink.php'>Yooooooooo man click this :P:P</a>";

that same link sometimes shows the session, others it doesnt

mculey
06-02-2006, 08:52 PM
Sounds like you've got trans_sid enabled. To check run the following:


<?php
echo ini_get("session.use_trans_sid");
?>


If it returns a 1 then trans_sid is enabled for your install of php. You can turn it off in the php.ini file or if you don't have access to it, you can do it with ini_set:


<?php
ini_set("session.use_trans_sid", 0);
?>


I would guess the reason that it's sometimes there and sometimes not is that you're not always initiating a session. It will only show up once the session has been initiated.

jeromepelletier
06-03-2006, 07:16 PM
Sounds like you've got trans_sid enabled. To check run the following:


<?php
echo ini_get("session.use_trans_sid");
?>


If it returns a 1 then trans_sid is enabled for your install of php. You can turn it off in the php.ini file or if you don't have access to it, you can do it with ini_set:


<?php
ini_set("session.use_trans_sid", 0);
?>


I would guess the reason that it's sometimes there and sometimes not is that you're not always initiating a session. It will only show up once the session has been initiated.

thanks! turning this off worked :)