dalecosp;11061901 wrote:Right, but a session hash, userid, and couple of other variables will never be more than a few KB ... right?
Yessir. This script:
session_start();
var_dump($_SESSION);
$_SESSION["userid"] = 1234567890;
$_SESSION["var1"] = "foo|DOH";
$_SESSION["var2"] = "bar";
Has the effect on my workstation of creating the file /var/lib/php5/sess_9c7g1fdirt8hp33jrr04p383o2 because Ubuntu's default session file location is /var/lib/php5. You can see where your system saves session files with this command:
echo session_save_path();
Listing that file, I see that it is 54 bytes:
$ sudo ls -al /var/lib/php5/sess_9c7g1fdirt8hp33jrr04p383o2
-rw------- 1 www-data www-data 54 May 11 10:24 /var/lib/php5/sess_9c7g1fdirt8hp33jrr04p383o2
And its contents look like so:
userid|i:1234567890;var1|s:7:"foo|DOH";var2|s:3:"bar";
I'm kinda puzzled at the serialization format there. That's not your usual output from serialize()