ZF-6256: Unknown option: savehandler = Array when using Zend_Application_Resource_Session

Issue Type: Bug Created: 2009-04-09T13:37:07.000+0000 Last Updated: 2009-04-17T05:21:07.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Chris Jones (leeked) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Application

Related issues: Attachments: - Zend_Application_Resource_Session.patch


Reproduce: Send session configuration to Zend_Application like this:

<pre class="highlight">$application = new Zend_Application(
        'resources' => array(
            'session' => array(
                'saveHandler' => array(
                    'class' => 'Zend_Session_SaveHandler_DbTable',
                    'options' => array(
                        'name' => 'session',
                        'primary' => 'id',
                        'modifiedColumn' => 'modified',
                        'dataColumn' => 'data',
                        'lifetimeColumn' => 'lifetime',

Throws an Exception: Zend_Session_Exception: Unknown option: savehandler = Array in Zend\Session.php on line 220


Posted by Chris Jones (leeked) on 2009-04-16T18:47:58.000+0000

The problem is caused because the key 'saveHandler' being sent to Zend_Session::setOptions() and it not being apart of one of either Zend_Session::$_defaultOptions or Zend_Session::$_localOptions.

My fix is relatively simple; pull the options and remove 'savehandler' from it before sending to Zend_Session::setOptions().

I'm thinking this isn't the most elegant solution, but it does work.

Posted by Chris Jones (leeked) on 2009-04-16T18:52:46.000+0000

Last .patch was for the wrong codebase. This is the correct patch.

Posted by Matthew Weier O'Phinney (matthew) on 2009-04-17T05:21:05.000+0000

Patch applied to trunk in r14957 -- thanks!

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.