Re: PHPSESSID used sporatically

From: Date: Thu, 17 Aug 2006 04:26:17 +0000
Subject: Re: PHPSESSID used sporatically
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-240793@lists.php.net to get a copy of this message
Michael B Allen wrote:
On Thu, 17 Aug 2006 12:06:08 +1000 Chris <dmagick@gmail.com> wrote:
Michael B Allen wrote:
Searching through the logs and browsing my site (see sig) I sometimes see PHPSESSID is used as opposed to cookies. I know it's not simply that the client doesn't support cookies because I can see the same IP transition to and from using PHPSESSID. Can someone explain why this is happening?
Is session.use_trans_sid switched on?
Yes. It is. After reading about it I can't quite see what benifit it provides. Should I just turn it off?
It depends on your site. If you do something like this for a search: <?php ... if (!isset($_SESSION['SearchResults']) || empty($_SESSION['SearchResults'])) { .. $result = $db->query($search_query); $search_results = array(); while($row = $db->fetch($result)) {
    $search_results[] = $row;
} $_SESSION['SearchResults'] = $search_results; } foreach($_SESSION['SearchResults'] as $k => $details) { .... } I could send someone a url with the sessionid on the end of it, and it won't have to do the bit in the middle, it will be able to jump right to the end (the foreach loop). If you don't do something like that, then you probably don't need the trans_sid on. so it depends on your site and your code. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#240793) next »