DataObject getLinks() not working on web host
| From: | Larry Garfield | Date: | Mon, 02 May 2005 07:19:31 +0000 |
| Subject: | DataObject getLinks() not working on web host | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19034@lists.php.net to get a copy of this message | ||
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
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'];
DB_DataObject::debugLevel(1);
$do = DB_DataObject::factory("Mission_Personnel");
$do->get(1);
$do->getLinks();
print_r($do);
?>
------------------
--
Larry Garfield AIM: LOLG42
larry@garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an
idea, which an individual may exclusively possess as long as he keeps it
to himself; but the moment it is divulged, it forces itself into the
possession of every one, and the receiver cannot dispossess himself of
it." -- Thomas Jefferson