hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Ini settings related to the sessions module aren't loaded until the module is used

Open jmarrama opened this issue 12 years ago • 2 comments

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

jmarrama avatar Feb 21 '14 00:02 jmarrama

Thanks for reporting this. Feel free to submit a PR if you (or someone else reading this) gets to this before we do.

scannell avatar Feb 21 '14 01:02 scannell

My repro case doesn't break anymore! Closing this issue.

jmarrama avatar Apr 02 '14 20:04 jmarrama