'file' and remote urls

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stsr11
Forum Newbie
Posts: 17
Joined: Thu Jul 15, 2004 6:57 pm

'file' and remote urls

Post by stsr11 »

I have had a look for this one on the forum already - found a few references, but they don't seem to apply. So here goes...

I am trying to read XML data from a remote URL. I have had no problems doing it locally (local host, accessing remote URL) - it all works fine on both Linux and Windows apache/php servers, but when I upload it to my host I get:
failed to create stream: No such file or directory in /www/functions.php on line 23
I have checked out 'allow_url_fopen' and that is set to 'true', my domain host uses PHP 4.3.0 (on Linux).

I can't even read files on my own website when I try to access them via a URL!

So, I am assuming it's a host PHP setup issue? Right???

Help...
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Can you verify that also fopen wrappers is set correctly?
stsr11
Forum Newbie
Posts: 17
Joined: Thu Jul 15, 2004 6:57 pm

Post by stsr11 »

Sorry, I'm being a bit thick here...this is all very new to me.

By fopen wrappers do you mean the 'allow_url_fopen' setting in php.ini or do you mean I have to setup/configure which wrappers are available?

'allow_url_fopen' is set to true/"1" in php.ini

I thought the wrappers were a standard part of PHP - as long as I was using at least version 4.x.0...

Does this help at all?

http://www.dotcount.com/version.php
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

I'm the thick one. We were talking about the same thing, but I'm adressing the thing thinking of it with a different name. It is the same. =/

I'm speechless and rather annoyed of this error. I did a file() lookup of a xml file myself both locally and on two hosts, not getting any issues. I was hoping that I could find something to compare with. Sorry.
stsr11
Forum Newbie
Posts: 17
Joined: Thu Jul 15, 2004 6:57 pm

Post by stsr11 »

Not to worry - thanks anyway.

Is there anything in the PHP info on the web link below that would stop my remote URL access from working?

http://www.dotcount.com/version.php
Post Reply