SESSION id is ... late.

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
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

SESSION id is ... late.

Post by Steveo31 »

I thought, that when a session in any way was set, like username, so on.. all the url's henceforth are appended with the session ID. I think I am wrong, as my site doesn't do this.

I know the session is started, I just store one variable in the session (username) and I can echo it anywhere in the site. BUT, there is no session ID. When I close it and come back a little later, the session id is appended, but just for that one link. Once its clicked on, it goes away.

What gives?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Check out your php.ini, look for
session.use_cookies = 1
session.use_trans_sid = 0

The comments surrounding those lines might clear it up for you :o
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Post by Steveo31 »

Hm, nope. Not really ;)

Well, I went back, and that sessionid is on all links.. not just one. I'll try turning off the session.use_cookies. Will this affect cookies set with setcookie() ?
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

you want to have the session-id in the addressbar? 8O
Post Reply