Inclusion Weirdness

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 ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-01-2004
Phinally
 
Posts: n/a
Default Inclusion Weirdness

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.


Reply With Quote
  #2 (permalink)  
Old 08-01-2004
Phinally
 
Posts: n/a
Default Re: Inclusion Weirdness

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.
>
>



Reply With Quote
  #3 (permalink)  
Old 08-01-2004
eclipsboi
 
Posts: n/a
Default Re: Inclusion Weirdness

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?
Reply With Quote
  #4 (permalink)  
Old 08-02-2004
Virgil Green
 
Posts: n/a
Default Re: Inclusion Weirdness

"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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0