How to delete the PHPSESSID?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jetbrains
Forum Newbie
Posts: 6
Joined: Tue Jun 27, 2006 9:08 pm

How to delete the PHPSESSID?

Post by jetbrains »

I have a php page which has a link to "yo-momma-joke.php",but when I open the link ,I found "PHPSESSID" had append the link.see bleow

http://www.jokelogic.com/yo-momma-joke. ... 1de20f9e1e

But I want it to be

http://www.jokelogic.com/yo-momma-joke.php.


How to delete the "PHPSESSID"?
Thank you in advance
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

The first time you load a page using a PHP session all of your internal links are going to be appended with the PHPSESSID variable. This is a mechanism put in place by PHP to be able to track sessions when using cookie is not available.

I wouldn't worry about deleting it. It does nothing except help your script manage sessions.
bdlang
Forum Contributor
Posts: 395
Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US

Post by bdlang »

Do you have 'session.use_trans_sid' turned on in your php.ini? This will cause the URL to have the PHPSESSID as you've seen. Take a look at all the Session settings in your php.ini file, or in a script with phpinfo().
jetbrains
Forum Newbie
Posts: 6
Joined: Tue Jun 27, 2006 9:08 pm

Post by jetbrains »

Thank Everah and bdlang very much.

Both of your messages are very helpful to me.

Great forum.
Thank you again.
Post Reply