DataObject Configuation Question
| From: | Barry Steele | Date: | Thu, 05 Aug 2004 00:37:50 +0000 |
| Subject: | DataObject Configuation Question | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13964@lists.php.net to get a copy of this message | ||
Hi there,
I've run into an issue that I'm having trouble nailing down.
I am running a very simple peice of code that looks something liek
<?PHP
echo "Hello<br>";
require "config.php";
Var_Dump::display($options);
error_reporting(E_ALL);
require_once "incident.php";
$inc = new incident();
$inc->incident->IncidentID = '1977';
$inc->incident->debugLevel(1);
$inc->incident->find(true);
$getLinks = $inc->incident->getLinks();
require_once("Var_Dump.php");
Var_Dump::display($inc->incident->toArray());
?>
I this actually works - it is a test for another more invovled bug, but
I get warnings and some very strange output :-
<output>
database String[44]
(mysql://user:passwd@localhost/incidents)
schema_location String[45] (/www/slsa/SLSA_Incidents/include/DataObjects/)
class_location String[45] (/www/slsa/SLSA_Incidents/include/DataObjects/)
require_prefix String[45] (/www/slsa/SLSA_Incidents/include/DataObjects/)
ini_incidents String[58] (/www/slsa/SLSA_Incidents/include/DataObjects/incidents.ini)
ini_SLSA_incidents String[58] (/www/slsa/SLSA_Incidents/include/DataObjects/incidents.ini)
class_prefix String[11] (DataObject_)
ignore_sequence_keys String[1] (0)
debug String[1] (0)
debug_ignore_updates String[1] (0)
production String[1] (0)
Notice: Use of undefined constant __CLASS__ - assumed '__CLASS__' in
/usr/share/pear/DB/DataObject.php on line 3314
Notice: Use of undefined constant __CLASS__ - assumed '__CLASS__' in
/usr/share/pear/DB/DataObject.php on line 3314
Warning: Wrong parameter count for print_r() in
/usr/share/pear/DB/DataObject.php on line 3317
Warning: Wrong parameter count for print_r() in
/usr/share/pear/DB/DataObject.php on line 3329
__CLASS__: __find:
Notice: Use of undefined constant PATH_SEPARATOR - assumed
'PATH_SEPARATOR' in /usr/share/pear/DB/DataObject.php on line 1564
Notice: Use of undefined constant __CLASS__ - assumed '__CLASS__' in
/usr/share/pear/DB/DataObject.php on line 3314
Notice: Use of undefined constant __CLASS__ - assumed '__CLASS__' in
/usr/share/pear/DB/DataObject.php on line 3314
__CLASS__: QUERY: SELECT * FROM Incident WHERE Incident.IncidentID =
1977
</output>
I expected
<output>
database String[42]
(mysql://username:passwd@localhost/incidents)
schema_location String[51] (/www/sites/slsa/SLSA_Incidents/include/DataObjects/)
class_location String[51] (/www/sites/slsa/SLSA_Incidents/include/DataObjects/)
require_prefix String[51] (/www/sites/slsa/SLSA_Incidents/include/DataObjects/)
ini_incidents String[64] (/www/sites/slsa/SLSA_Incidents/include/DataObjects/incidents.ini)
class_prefix String[11] (DataObject_)
ignore_sequence_keys String[1] (0)
debug String[1] (0)
debug_ignore_updates String[1] (0)
production String[1] (0)
dataobject_incident: __find: 1
dataobject_incident: QUERY: SELECT * FROM Incident WHERE
Incident.IncidentID = 1977
dataobject_incident: query: QUERY DONE IN 0.029175996780396 seconds
dataobject_incident: __find: CHECK autofetchd 1
dataobject_incident: __find: ABOUT TO AUTOFETCH
dataobject_incident: FETCH:
</output>
I have check the the 'class_location' path and it points to the correct
directory.
-- The different paths are because the output comes from dev and
production boxes.
Any thoughts?
THanks
Barry
Barry Steele
hpfm solutions pty ltd
mob: 0413947980
fax: 0299817727
mailto:: barry@hpfm.com.au