hhvm
hhvm copied to clipboard
Ini settings related to the sessions module aren't loaded until the module is used
error_reporting(E_ALL & ~E_WARNING);
ini_set("session.hash_bits_per_character", 5);
session_start();
var_dump(session_id());
session_destroy();
ini_set("session.hash_bits_per_character", 5);
session_start();
var_dump(session_id());
session_destroy();
Zend outputs
string(26) "abcdefg...."
string(26) "abcdefg...."
HHVM outputs
string(64) "0123..."
string(52) "abcdefg.."
It seems as if the ini settings for the sessions module don't take until the sessions module is actually used.
Note: there is a discrepancy in the length of the strings returned by session_id() due to a bug in bin_to_readable, tracked in #1884
Thanks for reporting this. Feel free to submit a PR if you (or someone else reading this) gets to this before we do.
My repro case doesn't break anymore! Closing this issue.