Forum Moderators: coopster

Message Too Old, No Replies

turn off PHPSESSID

         

bobnew32

1:48 am on Jan 13, 2004 (gmt 0)

10+ Year Member



I have a script which doesn't use the retarted PHPSESSID that is added onto the url, how do I automatically not make it come up? Its coming up randomly and annoying me.

coopster

6:56 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



PHP is capable of transforming links transparently. Unless you are using PHP 4.2 or later, you need to enable it manually when building PHP. Under Unix, pass --enable-trans-sid [php.net] to configure. If this build option and the run-time option
session.use_trans_sid
are enabled, relative URIs will be changed to contain the session id automatically.

You may want to read more about Passing the Session ID [php.net] in PHP. I'm guessing it is going to be a configuration-related issue.

Sunshyn

6:16 am on Jan 14, 2004 (gmt 0)

10+ Year Member



Last year, right during the holiday season, the PHP version on my server must have been updated without notice because I suddenly started getting PHPSESSID strings in the URL. It had severely screwed up my search engine placements before I figured out it was doing so.

The server owner added the following line to my .htaccess file to make it stop:

php_flag session.use_trans_sid off

mep00

7:21 am on Jan 14, 2004 (gmt 0)

10+ Year Member



php_flag session.use_trans_sid off

Doesn't that only hide it from those without cookies?

Sunshyn

7:48 am on Jan 14, 2004 (gmt 0)

10+ Year Member



Doesn't that only hide it from those without cookies?

The PHPSESSID was only showing up in the URL when cookies weren't on when that happened to me so it certainly stopped it from coming up at all. I can't tell from the initial post if the random occurances might have anything to do with cookies or not.