Issues

ZF-7563: Zend_Session_SaveHandler_DbTable Throws Zend_Db_Table_Select and Zend_Db_Table_Abstract: errors

Description

Using version 1.9 trying to save my session into a database I get a couple of errors.


// set up the session DB Table
         $config = array(
             'name'           => 'session',
             'primary'        => 'id',
             'modifiedColumn' => 'modified',
             'dataColumn'     => 'data',
             'lifetimeColumn' => 'lifetime',
             'lifetime'       => 604800,
             'db'             => Zend_Registry::get('db_master') 
         );

        //create your Zend_Session_SaveHandler_DbTable and
        //set the save handler for Zend_Session
        Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config));
         
        Zend_Session::start();

Gives me these errors: Fatal error: Cannot redeclare class Zend_Db_Table_Select in /Zend/Db/Table/Select.php on line 220

Fatal error: Access to undeclared static property: Zend_Db_Table_Abstract::$_writeClosed in Unknown on line 0

Comments

This is happening almost the same to me when trying to implemenet session handler DBTable.

What did you do in order to avoid theses errors?? I'm following the manual http://framework.zend.com/manual/en/… and I have tried to debug this error without success!

Thank you for any help!

(I'm not sure, Should I had have to clone this issue to get any answer?) (ZF version: 1.10.0)

@Periko Please post your code so I try to simulate from it(could post in http://pastebin.com/).

Thanks ;).

@Periko, I have not made any code modifications to get this to work. I noticed this was happening on my server with CentOS 5 and PHP 5.3.

I ended up reinstalling Cent and re-compiling PHP and this cleared up the strange errors I was getting. I did not change any code.

I'm still not sure what the root cause of this was. I racked my brain for a couple of days trying to figure this one out because there is not really a workaround that I know of if you have this issue. The only thing that worked for me was reinstalling everything on the server, and that cleared it up.