Page 1 of 1

Session ID appending to URL problem

Posted: Wed Jul 31, 2002 6:09 pm
by rmmoore
Hi,

I'm having a problem with session ID's being appended to every URL on a page everytime a new session is started. I can't find any php.ini variables that would cause this or any bugs in my code that will cause this. This only happens on creation of a new session. Every other page that uses the session does not do this, only the first call to the session.

Any ideas/suggestions? :?:

Thanks,
Ryan Moore

Few answers

Posted: Thu Aug 01, 2002 2:13 pm
by nitramoc
Well in your php.ini you can find the option session.use_trans_sid
if you set this to 0, PHP will not attach the SID to the URL.

The reason its only doing it for the first page is because it does not know yet if you are accepting cookies, if you are, then it will store the SID in a cookie and not use the URL. Thats why you are only seeing it attached to urls on thh first page.

Posted: Thu Aug 01, 2002 2:51 pm
by hob_goblin
i noticed that it would attach it to urls if i didnt write their whole address... for instance

<a href="viewnews.php">Foo</a>

would NOT validate.
but:

<a href="http://www.vexdev.com/viewnews.php">Foo</a>

WOULD validate.

hope it helped

Oooh ok

Posted: Wed Aug 07, 2002 10:43 pm
by rmmoore
Ok, good...that option is not in my php.ini config though, so I take it I need to reinstall php with some new option? Any easy way to do this?

Posted: Thu Aug 08, 2002 2:13 am
by twigletmac
Which version of PHP are you currently running? BTW, the install files for the latest versions are available on php.net:
http://www.php.net/downloads.php

Mac