Re: DataObject getLinks() not working on web host

From: Date: Mon, 02 May 2005 16:30:57 +0000
Subject: Re: DataObject getLinks() not working on web host
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19041@lists.php.net to get a copy of this message
On 5/2/05, Larry Garfield <larry@garfieldtech.com> wrote: > I've run into a highly annoying problem. Using PHP 4.3.10 and > DB_DataObjects 1.7.2 (what was current when I wrote this app), the > getLinks() method works perfectly fine on my system but does not resolve > the necessary classes when on my web host. My host doesn't have a > shared PEAR repository so I have one local to this app. A test script > is below. > > The db_dataobject.ini file, gmdarchive.ini file, and > gmdarchive.links.ini file are all where they belong, and since the > factory is working properly I'm assuming those are all correct. > However, on my web host with the debug level set I get the following > error printed (minus html and other stuff): > > autoload:Could not find class DataObjects_Mission using class_location value > factory could not find class from mission > getLink:Could not find class for row mission_id, table mission > Have you updated the path in the DataObject.ini file? If the path to the DataObjects or require prefix is different you need to change that. Also, have you set up your include path in the same way? > The exact same script works just fine on my system. Any idea what I > should be looking for on my web host? I've already confirmed that safe > mode is off on both systems, so that's not it. Any help greatly > appreciated. > > test.php > ------------------ > <?php > > phpinfo(); > > $cwd = dirname(realpath(__FILE__)); > > set_include_path("$cwd/PEAR" . PATH_SEPARATOR . get_include_path()); > > require_once("DB/DataObject.php"); > > $config = parse_ini_file('db_dataobject.ini',TRUE); > foreach($config as $class=>$values) { > $options = &PEAR::getStaticProperty($class,'options'); > $options = $values; > } > > $options = &PEAR::getStaticProperty('DB_DataObject','options'); > $config = parse_ini_file("db_dataobject.ini",TRUE); > $options = $config['DB_DataObject']; > Why are you paring the ini file twice? You want the top one, not the bottom one, although both will work. -- Justin Patrin

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