Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

'config_cache_enabled' throw an error on Zend\Session\Container::__set_state() #2818

Closed
martinezdelariva opened this issue Oct 21, 2012 · 2 comments

Comments

@martinezdelariva
Copy link

The following configurations on file 'config/application.config.php':
...
'module_listener_options' => array(
'config_cache_enabled' => true,
'config_cache_key' => 'cache',
'cache_dir' => 'data/cache',
),
...

Creates a cache file on 'date/cache/module-config-cache.cache.php' that I think is not well formatted because throw the error:
Fatal error: Call to undefined method Zend\Session\Container::__set_state().

That line on file 'date/cache/module-config-cache.cache.php' is:

'service_manager' =>
array (
'services' =>
array (
'session' =>
Zend\Session\Container::__set_state(array(
)),
),
),

@mwillbanks
Copy link
Contributor

Do you possibly have any additional information?

@martinezdelariva
Copy link
Author

I think it was my fault setting on file module.config.php the following on service manager key:

'service_manager' => array(
    'services' => array(
        'session' => new Zend\Session\Container('zf2tutorial'),
    ),
),

Then if I enable 'config_cache_enabled', on the file generated it throws an exception because is saved with the following syntax:

'service_manager' => 
  array (
    'services' => 
    array (
      'session' => 
      Zend\Session\Container::__set_state(array(
      )),
    ),
  ),

Sorry and thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants