Re: file_get_contents
| From: | Jochem Maas | Date: | Fri, 17 Nov 2006 11:16:36 +0000 |
| Subject: | Re: file_get_contents | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244796@lists.php.net to get a copy of this message | ||
Tom Chubb wrote:
> Confused!
> I'm now getting:
> file_get_contents(http://www.tnhosting.co.uk/scripts/gclub/player.php)
> [function.file-get-contents]: failed to open stream: Connection
> refused in
> /home/sites/tnhosting.co.uk/public_html/scripts/gclub/updateplaylist.php
> on line 75
> How come you can access it and I can't?!?
no php script can withstand me. ;-) seriously I don't know
> Permissions are 755.
> Obviously I was getting it when using file_get_contents('player.php')
> but when using the URL I get connection refused.
>
> (Don't think that it makes any difference, but allow_url_fopen is on)
it makes a difference, and it sounds likes it's off - another possibility
is that safe_mode is on (and that safe_mode blocks allow_url_fopen), but I don't
know about that - you'll have to test it.
you can double check that you can reach your site from the box itself by doing a
very simple 'wget' check from the commandline (assuming you have ssh access):
wget http://www.tnhosting.co.uk/scripts/gclub/player.php
if that downloads a page then the problem is very like to be php.
>
...