Re: re: Trouble with DB_DataObject generator
| From: | Alan Knowles | Date: | Wed, 01 May 2002 09:59:01 +0000 |
| Subject: | Re: re: Trouble with DB_DataObject generator | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2380@lists.php.net to get a copy of this message | ||
mitchell perilstein wrote:
Thanks for the debug hint. I changed createTables.php line 33 as follows and it works: $options = $config; // Was: $options = $config['DB_DataObject'] ah, that is a little odd.. parse_ini_file, with true is supposed to build an associative array withDB_Dataobject=> array(
xxx => yyyy.... I would have a quick look to see if there is any strange chars in the file which are causing it to missread the [DB_DataObject] bit.. let me know how you get on with postgres, I did quite a few updates 0.3->0.6 which should make it portable for all databases, but since I only test on mysql, the phrase 'should' is as good as it gets... Regards Alan
On Wed, 01 May 2002 01:15:54 +0800 Alan Knowles <alan@akbkhome.com> wrote:This is a little strange: line 91 - should be reading the options array which would have been read in by createTables.php.. Can you add this line in to see what is comming in from parse_ini_file.. $config = parse_ini_file($_SERVER['argv'][1],TRUE); #add a print_r, to see what is getting stored.. print_r($config); Regards Alan Hi folks, I'm trying to do this: php4 /usr/share/pear/DB/DataObject/createTables.phppwd/pear-data-object.ini and I get this: <b>Warning</b>: Invalid argument supplied for foreach() in <b>/usr/share/pear/DB/DataObject/Generator.php</b> on line <b>91</b><br /> DONE My .ini says: [DB_DataObject]database = mysql://xxxuser:xxxpassword@localhost/xxxdbschema_location = /home/mitch/public_html/staff/DataObjects class_location = /home/mitch/public_html/staff/DataObjects require_prefix = DataObjects/class_prefix = DataObjects_I'm using PHP 4.2.2 on Debian Linux, mysql debian package version 3.23.52-2, and some of the related PEAR versions: // $Id: DB.php,v 1.13 2002/07/02 15:19:49 cox Exp $ // $Id: DataObject.php,v 1.26 2002/09/10 04:34:06 alan_k Exp $ // $Id: PEAR.php,v 1.47 2002/07/21 07:04:45 ssb Exp $