Re: Help - Pear DB_DataObjects
| From: | Alan Knowles | Date: | Fri, 21 Feb 2003 09:52:15 +0000 |
| Subject: | Re: Help - Pear DB_DataObjects | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3880@lists.php.net to get a copy of this message | ||
Pauline Johnston wrote:
Thank you for the quick response! I have Pear installed, but I am using Windows so I don't think I can update it in the way you said. But your second point is probably where my problem is - I haven't done this & am not really sure what to do with the code? Where do I put it / execute it? Does it go in the DataObject.php file? That code usually goes in a generic config file - eg. if you add the lineinclude 'configFiles/config.php'; on each php page that is run, and put the code in there it should be ok. if you cant update (although the installer should almost be working on windows now) - you could just download the pear-tgz from the pear web site and copy the latest PEAR.php over your current one. Regards Alan
Many thanks -----Original Message----- From: Alan Knowles [mailto:alan@akbkhome.com] Sent: 21 February 2003 01:03 To: Pauline Johnston Cc: pear-general@lists.php.net Subject: Re: Help - Pear DB_DataObjects It needs an updated pear package - try pear install PEAR Regards Pauline Johnston wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comHello I would really appreciate some help with the configuration & installationofPear DB_DataObjects. When I run: ...\php4\php.exe createTables.php db.ini I get this X-Powered-By: PHP/4.2.2 Content-type: text/html <br /> <b>Fatal error</b>: Call to undefined function: getstaticproperty() in <b>c:\...\php4\pear\DB\DataObject.php</b> on line <b>1787</b><br /> My db.ini file looks like this: [DB_DataObject]http://pear.php.net/manual/en/packages.database.db-dataobject.configuration.database = mysql://xxx:xxx@./dbschema_location = /.../DataObjects class_location = /.../DataObjects require_prefix = DataObjects/class_prefix = DataObjects_I didn't understand what you were meant to do with example 2 shown atphp as it doesn't explain...That loads the db.ini file into a static variable (stored and fetched using PEAR::getStaticProperty(), so that it can be read at any time by the DB_DataObject class. - it allows you to load the config without having to load DataObjects. Regards AlanAny help gladly received! thanks, Pauline