Re: PHPSESSID used sporatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael B Allen wrote:
On Thu, 17 Aug 2006 12:06:08 +1000
Chris <dmagick@xxxxxxxxx> 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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux