on 01/10/02 7:45 PM, Daniel Alsén ([EMAIL PROTECTED]) wrote:

> John W. Holmes propably said:
> 
>> Do you have a session_start() on the page? It looks like you have a
>> trans_sid enabled. PHP will add that to all of your URLs
>> automatically. Can you disable it in php.ini?
> 
> Yes trans_sid is enabled and i have a session_start on the page. What is
> trans_sid doing exactly? I tried looking it up in the documentation but
> don't really get it

IF you're using sessions, and IF the client (browser) doesn't have cookies
available, PHP's trans sid re-writes the URLs on your pages to include a
session ID.


> What would i loose if i disabled trans_sid (or actually - tried to persuade
> my webhotel to disable it).

You'd loose session for those without cookies.  The work around for this
would be to hard-code the session ID to all URLs across your site for all
pages you wish to carry a session through -- a real pain.


> The strange thing is also that it only adds the session id to url:s when the
> page is first loaded. After the first click it goes away.

It HAS TO use a session ID from the first page to the second, to be sure
that the session is being carried... on the second page, it assesses if the
cookie was set, and if so, doesn't bother rewriting any of the URLs, else,
it continues.


Most people beg to HAVE trans_sid enabled on their server, not to have it
removed.  It ensures the widest array of people can access your site without
breaking sessions, and without the need for you to include (pass around) a
session ID throughout your site via URLs.


Justin


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

Reply via email to