spyfx
(Holyandor)
November 26, 2013, 4:27pm
1
I am getting the following error when I want to
unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 47 of 868282 bytes (E:\dev\xampp\htdocs\yii\framework\caching\CCache.php:108)
when I want to:
Yii::app()->cache->get($id);
The config/main.php:
'cache'=>array(
'class'=>'system.caching.CMemCache',
'servers'=>array(
array('host'=>'localhost', 'port'=>11211, 'weight'=>100),
),
),
Keith
(Kburton)
November 26, 2013, 4:49pm
2
Have you just updated Yii? I believe there have been changes in cache serialization. You’d probably need to explicitly flush the whole cache.
spyfx
(Holyandor)
November 26, 2013, 6:22pm
3
well, I cant update the Yii version, because the project is kinda big and I wont have enough time to change everything, but it could be the problem (my Yii version is about a half year old). I have just cleared the browser cache so far, but I will try a flush via the windows console.
spyfx
(Holyandor)
November 27, 2013, 12:01pm
4
Update: Both ways didnt work for me (Yii update and flush)
Update2: tryed to make use of CFileCache - got the same error.
Seems like there is a limit set in the framework/php but the limit is default 64MB so I guess it has to do with php/the framework.
data looks like:
array(2) {
["value"]=>
array(3581) {
[0]=>
array {
[0]=>
float(946854000000)
[1]=>
float(30.6)
[2]=>
float(29.1)
[3]=>
float(28.<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='8)' />
[4]=>
float(31.5)
[5]=>
float(138500)
}
[1]=>
array {
[0]=>
float(946940400000)
[1]=>
float(29.45)
[2]=>
float(28.2)
[3]=>
float(27.5)
[4]=>
float(29.45)
[5]=>
float(187000)
}
there could be also a problem with double quotes?