Re: help with configuring DB_DataObject

From: Date: Sun, 11 Sep 2005 19:20:11 +0000
Subject: Re: help with configuring DB_DataObject
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20902@lists.php.net to get a copy of this message
Thanks for your response. I did indeed use PEAR to install these files. I have quite a few PEAR packages installed with no problems. All the PEAR files are installed as the same user/group with the same permissions (755 on directories, 744 on files). I am trying to implement DB_DataObject into a currently existing application that is already utilizing PEAR's DB package, as well as several other packages with no errors or warnings being generated. When I run phpinfo(), my include path is listed as ".:/usr/local/php5/lib/php", which is the default. I can try to substitute into Generator.php the full path of DB.php, but I don't understand why that's necessary if PHP is telling me that the include path points to the PEAR directory. Without any familiarity with this one, I'm not sure what kind of results I would get if I move forward like that. Wes On Sep 11, 2005, at 3:06 PM, Justin Patrin wrote:
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 -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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