Re: Problem with DB_DataObject Generator
| From: | Alan Knowles | Date: | Wed, 26 Mar 2003 07:00:11 +0000 |
| Subject: | Re: Problem with DB_DataObject Generator | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4430@lists.php.net to get a copy of this message | ||
Psycho Junkie wrote:
Hi, I'm very enamoured with the idea of the DB_DataObjects system. Unfortunately I've had a lot of trouble getting it all working! I've finally gotten to the stage that when I run php.exe createTables.php ourdata.ini it doesn't crash, or lose things, or try toif you are using windows. (eg. php.exe) - the paths below are unix paths , and should look more like C:\PHP4\PEAR\DataObjects\ in both cases it's likely that you will need to do #php -d include_path=/u/cs/2/cs2proje/Application/PEAR-1.0.1 createTables.php ourdata.ini
use the university's (out of date) PEAR package. Unfortunately, however, when I run this command, all I get is: CREATING FOR: mysql://cs2proje:xxxxxx@amos.bath.ac.uk/cs2proje Then it returns to the command prompt and there don't seem to have been any visible classes created in response to the database investigation. My ourdata.ini file looks like this: [DB_DataObject] ; Required Configuration Optionsdatabase = mysql://cs2proje:xxxxxxx@amos.bath.ac.uk/cs2projeschema_location = /u/cs/2/cs2proje/Application/PEAR-1.0.1/DB/DataObject require_prefix = /u/cs/2/cs2proje/Application/PEAR-1.0.1/DB/DataObject - see notes below on class_location.
class_prefix = DataObject_ debug = 1 production = FALSE - production is not used in the latest versions - I've worked a better config system in.
; Builder Configuration Options class_location = /u/cs/2/cs2proje/Application/PEAR-1.0.1/DB/DataObject this will result in the files being output to this directory -I would suggest you use /u/cs/2/cs2proje/Application/PEAR-1.0.1/DataObjects (then your prefix - DataObject_ will match PEAR's naming standard, and it will be obvous where the files end up. Regards Alan
extends = DB_DataObject extends_location= /u/cs/2/cs2proje/Application/PEAR-1.0.1 Anyone who has any help to offer, it would be hugely appreciated! PJ Computer Information Systems Student Second Year, Department of Computer Science University of Bath, UK _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger