Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #3025 createTables gives an error
Submitted: 2004-12-24 01:49 UTC
From: developer at ckiweb dot com Assigned:
Status: Bogus Package: DB_DataObject
PHP Version: 4.3.10 OS: Gentoo
Roadmaps: (Not assigned)    
Subscription  


 [2004-12-24 01:49 UTC] developer at ckiweb dot com
Description: ------------ I try running createTables.php and I get an error everytime when it tries to run generatedefinitions. It had run perfectly fine before, but I just upgraded to PHP-4-3-10, and now it is crashing. Reproduce code: --------------- just run createTables.php Expected result: ---------------- I expect my tables to be made. Actual result: -------------- db_dataobject_generator : 0 : CREATING FOR ckidata db_dataobject_generator : 0 : calling generatedefinitions Fatal error: Call to a member function on a non-object in /usr/lib/php/DB/DataObject/Generator.php on line 132

Comments

 [2004-12-24 01:52 UTC] developer at ckiweb dot com
var_dump seems to show some really funny things. If I do var_dump($t) before $t->_createTableList, I get the class. Right after $t->_createTableList, I get NULL, and in the foreach loop I get an array(62).
 [2004-12-24 02:06 UTC] alan_k
4.3.10 was broken, please use latests snapshot from snaps.php.net
 [2005-01-10 21:16 UTC] naveen at dittakavi dot com
Hi. I am having the same issue with 4.3.10... However I cannot load the newest snapshot -- I do not have control over my server as it is a shared hosting server. Is there ANY workaround or do we need to manually define our table structures in the ini file until 4.3.11 is released? Note that I am only having trouble with createtables not queries (thank god).
 [2005-01-11 00:48 UTC] alan_k
adding define('DB_DATAOBJECT_NO_OVERLOAD',1); to the first line of createTables.php might fix it.
 [2005-01-11 21:04 UTC] naveen at dittakavi dot com
Thanks SOO Much. I always put define('DB_DATAOBJECT_NO_OVERLOAD',1); in DataObject.php but did not know I had to override it in createTables as well. Thanks again!
 [2005-02-14 14:03 UTC] fprado at pmovil dot com dot br
Hello, The only way I found it to work on my case was instancing the database as a reference, like below: $t =& new $class; Hope this helps! Flavio