Re: help with configuring DB_DataObject
| From: | Alan Knowles | Date: | Mon, 12 Sep 2005 01:55:02 +0000 |
| Subject: | Re: help with configuring DB_DataObject | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20910@lists.php.net to get a copy of this message | ||
> 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
>
Which version is this, I think it has been fixed in CVS, and from what I
remember that fix has been released now.
BTW. It may be easier to start by generating single database files
first, then once that works try the multi-database stuff.
Regards
Alan
> I don't understand, am I missing a step or something here? I have
> been using DB without incident. Is there another step I am missing? I
> also don't really understand where parsing the ini file comes into
> the process. If I create a PHP file with
>
> <?php
> $config = parse_ini_file( "/Library/WebServer/Documents/includes/
> DataObject/db_dataobject.ini", TRUE );
> foreach( $config as $class=>$values ) {
> $options = &PEAR::getStaticProperty( $class, "options" );
> $options = $values;
> }
> ?>
>
> and run it at the command line, it echoes the contents of the .ini
> file and that's pretty much it. Trying to run the createTables.php
> file after that still results in the above-listed error message about
> DB not being found.
>
> Any help would be greatly appreciated.
>
> Wes