Closed Thread Icon

Topic awaiting preservation: Damn test servers... Pages that link to <a href="https://ozoneasylum.com/backlink?for=13110" title="Pages that link to Topic awaiting preservation: Damn test servers..." rel="nofollow" >Topic awaiting preservation: Damn test servers...\

 
Author Thread
Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 03-25-2004 12:11

I'm getting a strange error on all of my pages for a site I'm building. The whole thing is failing on an include (which should only produce a warning if it fails, not a fatal error) with the error: "fatal error opening required file http://localhost/site1/includes/functions.php: Includes path (.;c:/phpdev/php/includes;c:/phpdev/php/classes)"

It's very strange. My include code is:

include("http://localhost/site1/includes/functions.php");

now, I'm not doing a require function here, so it should be a fatal error, and I beleive my include syntax is correct, so I've got no idea why my server is generating this error. Got any ideas?

Justice 4 Pat Richard

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 03-25-2004 15:02

well... apart from the fact that I'd [be very unfriendly to] every developer that presents me a http include [in real code]...

I'd guess that either
-the error isn't where you think it is - what line is your fatal error on? Same as the include
-your server has remote including turned off (and it should!)
-you meant to use a local include in the first place, and your server has remote including turned of.

You know what can happen when someone takes over the server you're including from? Or appears to be taking over the server you are including from? DNS spoofing is not unheard of.

So long,
TP

Edit: Added some friendly ness to this post.

[This message has been edited by Tyberius Prime (edited 03-25-2004).]

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 03-25-2004 21:14

I'm sorry, I didn't quite realise what I was doing...so...since I'm on a windows server, it should look more like

include("c:/phpdev/www/site1/includes/functions.php");

?

Justice 4 Pat Richard

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 03-25-2004 23:05

if "site1" is a virtual web/root then couldn't you use just "/includes/functions.php" and if it's not a virtual then "/site1/includes/functions.php" ?

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 03-27-2004 18:34

yeah, that with the c:/ in it should work.

You could also consider getting there via a relative path dirname(__FILE__). '/../../site1/include' or something similar. (The grail does it that way, I believe)

« BackwardsOnwards »

Show Forum Drop Down Menu