Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-29-2008, 12:06 PM
Junior Member
 
Join Date: May 2008
Posts: 1
Default Fatal error in Zend_Db_Table_Abstract

Hi,

Let me first briefly introduce my problem.

I'm using the Zend_Session_SaveHandler_DbTable class from the incubator to store session information a MySQL tabel.

In my bootstrap.php I have the following code to setup the savehandler.

PHP Code:
ini_set('include_path'ini_get('include_path') . PATH_SEPARATOR '../library/');

$db Zend_Db::factory($config->db->connection$config->db->toArray());
Zend_Db_Table::setDefaultAdapter($db);

Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config->sessionhandler->toArray())); 
This leads to the following error when using the Zend_Session class to store a value (using NameSpace).

Warning: Zend_Db_Table_Abstract::require_once(Zend/Db/Table/Select.php) [function.Zend-Db-Table-Abstract-require-once]: failed to open stream: No such file or directory in X:\htdocs\library\Zend\Db\Table\Abstract.php on line 773

Fatal error: Zend_Db_Table_Abstract::require_once() [function.require]: Failed opening required 'Zend/Db/Table/Select.php' (include_path='.;C:\php5\pear;../library/') in X:\htdocs\library\Zend\Db\Table\Abstract.php on line 773


What is going on here? I have no clue. Obviously the files are just there and the library path is in the include path. Stanger even is that just setting up a model with a class that extents Zend_Db_Table_Abstract does not produce errors when selecting data through it (while passing the same code line).

Anybody experienced this before?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-31-2008, 05:15 PM
Junior Member
 
Join Date: May 2008
Posts: 4
Default

Yes I had this problem too. What I did is to use an absolute path in stead of ../library.

So this: ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '../library/'); would become ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . getcwd() . '/../library/');

The problem I hink is somewhere in the savehandler because I had the exact same problem when I was using an sessionhandler.

Hope this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:59 AM.