Php Session ID

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
bdeonline
Forum Commoner
Posts: 42
Joined: Sun Jul 18, 2004 10:45 am

Php Session ID

Post by bdeonline »

Will the session id allways be unique, will php ever use the same session id twice?
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

yes session ids will be resued. theres only a finite amount of ids it can issue, so eventually, all ids will be duplicates. but its a pretty big number of diff ids......

but thats why garbage collection is done frequently on the session files.
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

I believe that the id is built by doing an md5 on the timestamp so in theory they are unique. I have heard rumours that an md5 collision has been proven though.
Post Reply