1. 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

Discussion in 'Troubleshooting and Problems' started by EgyKit, Nov 7, 2013.

  1. EgyKit

    EgyKit Member

    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';
     
  2. Mike

    Mike XenForo Developer Staff Member

    If you change that value, you need to purge the cache (or change your cache prefix). It's invalidated all of the existing data.
     
  3. EgyKit

    EgyKit Member

    Thank you, how to purge the zend cache? is there any php code?
     
  4. Mike

    Mike XenForo Developer Staff Member

    Since you're using APC, restart your web server.
     
    EgyKit likes this.

Share This Page