• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Getting php error after enabling automatic_serialization in cache file

#1
Hello,

I'm getting unserialize() error after enabling automatic_serialization in config file

PHP:
    $config['cache']['frontendOptions'] = array('caching'  =>  true,
      'automatic_serialization' => true,
      'lifetime'  => 10800,
      'cache_id_prefix'  =>  'xf_'
    );
Code:
An exception occurred: unserialize() expects parameter 1 to be string, array given in /library/XenForo/Model/DataRegistry.php on line 117

XenForo_Application::handlePhpError()
unserialize() in XenForo/Model/DataRegistry.php at line 117
XenForo_Model_DataRegistry->getMulti() in XenForo/Dependencies/Abstract.php at line 144
XenForo_Dependencies_Abstract->preLoadData() in XenForo/FrontController.php at line 127
XenForo_FrontController->run() in /index.php at line 13
Any idea why I'm getting this? I've APC enabled in config file and running PHP as fastcgi

This is what I've in config file

PHP:
    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] = array('caching'  =>  true,
      'automatic_serialization' => true,
      'lifetime'  => 10800,
      'cache_id_prefix'  =>  'xf_'
    );
    $config['cache']['backend'] = 'Apc';
 

Mike

XenForo developer
Staff member
#2
If you change that value, you need to purge the cache (or change your cache prefix). It's invalidated all of the existing data.