Re: help with configuring DB_DataObject

From: Date: Sun, 11 Sep 2005 19:06:46 +0000
Subject: Re: help with configuring DB_DataObject
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20901@lists.php.net to get a copy of this message
On 9/11/05, Wesley Furgiuele <wesley@furgiuele.net> wrote: > I don't know if I'm missing something obvious, but I can't seem to > get DB_DataObject configured. > > ------------CURRENT SETUP----------------- > Mac OS X Server 10.4.2 > PHP 5.0.4 (module from Marc Liyanage) > MySQL 4.0.18 (Apple default installation) > Apache 1.3.33 (Apple default installation) > > /Library/WebServer/Documents <-- web root > .:/usr/local/php5/lib/php <-- include_path > > PEAR 1.3.5 stable > DB_DataObject 1.7.15 stable > DB 1.7.6 stable > -----------------END SETUP---------------------- > > As I understand it, the steps are > (1) create the .ini file > (2) create the classes with the .ini file > (3) before use, configure DB_DataObject with the .ini file > > I have several databases I want to access with DB_DataObject. So, > here is my config file, saved at /Library/WebServer/Documents/ > includes/DataObject/db_dataobject.ini: > ----------------db_dataobject.ini------------------------ > [DB_DataObject] > > database_first = mysql//root_username:root_password@localhost/first > database_second = mysql//root_username:root_password@localhost/second > database_the_third = mysql//root_username:root_password@localhost/ > the_third > schema_location = /Library/WebServer/Documents/includes/DataObject/ > class_location = /Library/WebServer/Documents/includes/DataObject/ > require_prefix = /Library/WebServer/Documents/includes/DataObject/ > class_prefix = DataObject_ > debug = 3 > --------------------------------------------------------------- > > At this point, I change directories to the DataObject directory and > try to create the classes, like so: > > grok: /Library/WebServer/Documents/includes/DataObject grok$ cd /usr/ > local/php5/lib/php/DB/DataObject > grok: /usr/local/php5/lib/php/DB/DataObject grok$ php > createTables.php /Library/WebServer/Documents/includes/DataObject/ > db_dataobject.ini > DB_DataObject_Geneator : 0 : CREATING FOR first > > PHP Fatal error: Class 'DB' not found in /usr/local/php5/lib/php/DB/ > DataObject/Generator.php on line 112 > Fatal Error: Class 'DB' not found in /usr/local/php5/lib/php/DB/ > DataObject/Generator.php on line 112 > Sounds like you don' t have PEAR installed correctly or you didn't set up your include_path right. Did you use the PEAR installer to install these packages? -- Justin Patrin

« previous php.pear.general (#20901) next »