This is a discussion on Inclusion Weirdness within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hey There, I am having I weird problem with using PHP::DB. I have an OO model whereby I load ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hey There,
I am having I weird problem with using PHP::DB. I have an OO model whereby I load objects and they know how to persist and load themselves. For some reaons in certain places in my code, when I attempt to use the DB methods to query the DB - DB.php returns an error: [2004-08-01 00:51:21] connect(): Failed opening 'DB/.php' for inclusion (include_path='.:/local/packages/php/lib/php:/local/packages/phrame:/local/p ackages/Savant') in /local/packages/php-4.3.8/lib/php/DB.php:373 I have checked and DB.php is located in /local/packages/php/lib/php and is the same file as /local/packages/php-4.3.8/lib/php/DB.php The code that creates the objects and loads them is the same in both places, but in certain places the error is produced: $instance = new TrackedInstance(); $instance->setTrackedID( $this->trackedID ); $instance->load(); Any idea what might be causing this or how to better troubleshoot the source of the problem? Shawn. |
|
|||
|
For clarification:
When I say that the problem is happening in one part of my code, and isn't in another - I mean that the result is different depending on the file. One file (where is works) is a View extended class (Phrame), but it is not working in a file that is an Action extended class. Thanks, Shawn. "Phinally" <phinally@gmail.com> wrote in message news:3T_Oc.500$Fdk1.138@news04.bloor.is.net.cable. rogers.com... > Hey There, > > I am having I weird problem with using PHP::DB. I have an OO model whereby I > load objects and they know how to persist and load themselves. For some > reaons in certain places in my code, when I attempt to use the DB methods to > query the DB - DB.php returns an error: > > [2004-08-01 00:51:21] connect(): Failed opening 'DB/.php' for inclusion > (include_path='.:/local/packages/php/lib/php:/local/packages/phrame:/local/p > ackages/Savant') in /local/packages/php-4.3.8/lib/php/DB.php:373 > > I have checked and DB.php is located in /local/packages/php/lib/php and is > the same file as /local/packages/php-4.3.8/lib/php/DB.php > > The code that creates the objects and loads them is the same in both places, > but in certain places the error is produced: > $instance = new TrackedInstance(); > $instance->setTrackedID( $this->trackedID ); > $instance->load(); > > Any idea what might be causing this or how to better troubleshoot the source > of the problem? > > Shawn. > > |
|
|||
|
On Sun, 01 Aug 2004 05:06:07 GMT, "Phinally" <phinally@gmail.com>
wrote: >[2004-08-01 00:51:21] connect(): Failed opening 'DB/.php' for inclusion >(include_path='.:/local/packages/php/lib/php:/local/packages/phrame:/local/p >ackages/Savant') in /local/packages/php-4.3.8/lib/php/DB.php:373 What exactly is the code at line 373 of DB.php? |
|
|||
|
"Phinally" <phinally@gmail.com> wrote in message
news:3T_Oc.500$Fdk1.138@news04.bloor.is.net.cable. rogers.com... > Hey There, > > I am having I weird problem with using PHP::DB. I have an OO model whereby I > load objects and they know how to persist and load themselves. For some > reaons in certain places in my code, when I attempt to use the DB methods to > query the DB - DB.php returns an error: > > [2004-08-01 00:51:21] connect(): Failed opening 'DB/.php' for inclusion Note the '/' after the DB. I think that you are failing to populate a variable that identifies the correct .php script within the DB directory to include. > (include_path='.:/local/packages/php/lib/php:/local/packages/phrame:/local/p > ackages/Savant') in /local/packages/php-4.3.8/lib/php/DB.php:373 > > I have checked and DB.php is located in /local/packages/php/lib/php and is > the same file as /local/packages/php-4.3.8/lib/php/DB.php You appear to be using the latter, not the former. But I also think that is not relevant to the issue at hand. > The code that creates the objects and loads them is the same in both places, > but in certain places the error is produced: > $instance = new TrackedInstance(); > $instance->setTrackedID( $this->trackedID ); > $instance->load(); > > Any idea what might be causing this or how to better troubleshoot the source > of the problem? As was already recommended by another, post the code at line 373 of DB.php. As a suggestion, you should go to line 373 of DB.php and echo all the variables used in line 373 to see what they contain. - Virgil |