0

I have app, in ZF1, where is not bootstrap. In config I have:

resources.session.save_path = APPLICATION_PATH "/../tmp/session"
resources.session.remember_me_seconds = 315360000
resources.session.gc_maxlifetime = 315360000

Folder tmp/session is set on 0777

In login controller before redirect on admin url (after logged) I have

Zend_Session::rememberMe();

In folder tmp/session was not created any file and app is automatically logouted after 1 hour. How can I init session resources from config without bootstrap?

tomasr
  • 485
  • 1
  • 8
  • 24

1 Answers1

0

Since you are not bootstraping, you need to load the session settings manually:

You could use:

$configFilepath = '/path/to/application.ini';
$config = new Zend_Config_Ini($configFilepath);
$settings = $config->toArray();

Zend_Session::setOptions($settings['resources']['session']);
Jannes Botis
  • 11,154
  • 3
  • 21
  • 39