[eluser]Trankh1[/eluser]
Hello,
I want to store in session a multiarray with 1500 records.
This is an example which reproduces the error:
Code:
for ($i = 1; $i < 1500;$i++) {
$array = array("name" => "igor", "website" => "facebook.com", "age" => "32");
array_push($array_test, $array);
}
$this->session->set_userdata('myarray', $array_test);
print_r( $this->session->userdata('myarray'));
I use the traditionnal Session->set_userdata function.
The problem is :
Code:
Severity: Notice --> unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 65531 of 65535 bytes system/libraries/Session.php 726
I have tried json_encode the array before storing but it is the same error.
I have tried with a multiarray of 500 and no error.
Have you guys solutions to this pattern (storing big array in session)?
Data stored into this array are from social network api call and are just used for the session .
Thanks!
I'm using CodeIgniter (and mysql) with session handling in database.
My user_data column in db is text type and utf8_general_ci encoded.
This is my session config part file:
Code:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 300;