I've created a test file to find out how big my session can be.
It's something like this:
print_r($_SESSION);
$test = array();
for ($i=0;$i<3320;$i++) {
$test[$i] = "test:)";
}
$size = mb_strlen(serialize($test), '8bit');
echo "Size: $size";
$_SESSION['test'] = $test;
When I do this, the $_SESSION['test']
gets reset (its value is nothing). When I'm doing this in a lesser for
(3319 times) or for a shorter string, then it's working fine. Size value is in this case 65279 bytes. I figure I should be able to change some setting in php.ini to be able to store more data, but which one would that be?
Just for your information - I don't care about performance, there shouldn't be really more than one person at the time using the script and it's for some synchronization with another server so the user will need to wait anyway. I'm just looking for an information how can I store more data in the $_SESSION
table.
My PHP version is 5.2.17 and I'm using osCommerce (really old one).