Session/Cookie problem.

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
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Session/Cookie problem.

Post by Gen-ik »

This might sound a bit stooopid but is it possible to use sessions when someone has got their browser set-up not to accept cookies?

It seems that the default cookie setting for IE (and possibly other browsers) stops PHP using $_SESSION :? And there's me thinking that people who don't use cookies are just paranoid!

Any help or work-arounds would be tops.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Nope, but if you have session.use_trans_sid set to 1 then it will revert to putting the session id in the url if cookies are disabled.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

quoting the fine manual..
php manual wrote: Alternatively, you can use the constant SID which is always defined. If the client did not send an appropriate session cookie, it has the form session_name=session_id. Otherwise, it expands to an empty string. Thus, you can embed it unconditionally into URLs.
So, yes, with much effort, you can do so manually as well
Post Reply