Session length in PHP5

liunx

Guest
Why session is smallee in PHP 5 than in PHP4?

PHP4.3: 861235bc4aea92e0d36cb5908b70af2d
PHP5: 9m3kd19a32ebudsua5o5urnu75from the manual (<!-- m --><a class="postlink" href="http://www.php.net/manual/en/ref.session.php">http://www.php.net/manual/en/ref.session.php</a><!-- m -->):

session.hash_function
session.hash_function allows you to specify the hash algorithm used to generate the session IDs. '0' means MD5 (128 bits) and '1' means SHA-1 (160 bits).

Note: This was introduced in PHP 5.

session.hash_bits_per_character
session.hash_bits_per_character allows you to define how many bits are stored in each character when converting the binary hash data to something readable. The possible values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-", ",").

Note: This was introduced in PHP 5.In other words the session key is longer in PHP5 :DNo, I think Devin was pointing out that sessions can be longer or shorter in php5 than previous versions depending on how you have it set up.Originally posted by bpat1434
No, I think Devin was pointing out that sessions can be longer or shorter in php5 than previous versions depending on how you have it set up. Did I say otherwise? I was just pointing out that the 160 bits of "9m3kd19a32ebudsua5o5urnu75" made for a longer key than the 128 bits of "861235bc4aea92e0d36cb5908b70af2d".No, you didn't say otherwise. But I just think that it should be brought to the attention that the proper answer to the question is:
In PHP5 the session lenghts can be longer or shorter depending upon how you wish to encode them (160 or 128 bits).

Your post:
In other words the session key is longer in PHP5
Suggests to me that they are only longer; however, they can be longer or shorter.

Just an observation I made. I don't mean to put you down, nor build myself up. Just trying to add a little bit more clarification on the issue.

~Brett
 
Back
Top