Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-16 Thread Richard Quadling
2009/12/16 René Fournier m...@renefournier.com: On 2009-12-15, at 11:55 PM, Richard Quadling wrote: Do you have a default stream context defined for the http stream? Nope. A _LONG_ time ago, when I was using a firewall with NTLM authentication (which PHP doesn't deal with), I had to route

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-15 Thread Richard Quadling
2009/12/14 Ashley Sheridan a...@ashleysheridan.co.uk On Mon, 2009-12-14 at 17:03 +0200, Cafer Şimşek wrote: René Fournier m...@renefournier.com writes: On 2009-12-14, at 10:44 PM, Cafer Şimşek wrote: René Fournier m...@renefournier.com writes: 4.as per php.ini,

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-15 Thread René Fournier
On 2009-12-15, at 11:55 PM, Richard Quadling wrote: Do you have a default stream context defined for the http stream? Nope. A _LONG_ time ago, when I was using a firewall with NTLM authentication (which PHP doesn't deal with), I had to route all my calls through a local proxy. This was

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-15 Thread René Fournier
On 2009-12-15, at 11:55 PM, Richard Quadling wrote: Do you have a default stream context defined for the http stream? Nope. A _LONG_ time ago, when I was using a firewall with NTLM authentication (which PHP doesn't deal with), I had to route all my calls through a local proxy. This was

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-14 Thread Gaurav Kumar
Sorry buddy, I cant think of anything else which is going on wrong. 2009/12/14 René Fournier m...@renefournier.com PHP Version 5.3.0 Directive Local Value Master Value allow_call_time_pass_reference Off Off allow_url_fopen On On 2009-12-14, at 12:26 AM, Gaurav Kumar wrote: What is

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-14 Thread René Fournier
Well thanks for trying. For anyone reading this, who wants to be a hero and solve the impossible: 1. file_get_contents ($url) doesn't work -- (on remote URLs or local URLs) 2. file_get_contents ($file) works. 3. CURL works (on remote and local URLs). 4. as per php.ini,

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-14 Thread Cafer Şimşek
René Fournier m...@renefournier.com writes: 4.as per php.ini, allow_url_fopen On Look at from phpinfo() the settings is already On. Best Regards. -- Cafer Şimşek DEV Staff Leader http://pazar.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-14 Thread René Fournier
On 2009-12-14, at 10:44 PM, Cafer Şimşek wrote: René Fournier m...@renefournier.com writes: 4. as per php.ini, allow_url_fopen On Look at from phpinfo() the settings is already On. Yes, I know. Which is why it's odd that the function fails on URLs. -- PHP General Mailing List

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-14 Thread Cafer Şimşek
René Fournier m...@renefournier.com writes: On 2009-12-14, at 10:44 PM, Cafer Şimşek wrote: René Fournier m...@renefournier.com writes: 4. as per php.ini, allow_url_fopen On Look at from phpinfo() the settings is already On. Yes, I know. Which is why it's odd that the function fails

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-14 Thread Ashley Sheridan
On Mon, 2009-12-14 at 17:03 +0200, Cafer Şimşek wrote: René Fournier m...@renefournier.com writes: On 2009-12-14, at 10:44 PM, Cafer Şimşek wrote: René Fournier m...@renefournier.com writes: 4.as per php.ini, allow_url_fopen On Look at from phpinfo() the settings is

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-13 Thread Gaurav Kumar
Ok Agreed. Lets do one last chance to ensure that your system is allowing external connections or connection to other systems in the network- Use Curl to get in the file contents. Check your PHP that Curl is enabled. Through phpinfo(); If the script output the google page then this means that

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-13 Thread René Fournier
CURL works (remote and local) file_get_contents() doesn't work (remote or local). On 2009-12-13, at 4:39 PM, Gaurav Kumar wrote: Ok Agreed. Lets do one last chance to ensure that your system is allowing external connections or connection to other systems in the network- Use Curl to

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-13 Thread Gaurav Kumar
What is the value for allow_url_fopenhttp://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen in your php.ini? It should be 1. 2009/12/13 René Fournier m...@renefournier.com CURL works (remote and local) file_get_contents() doesn't work (remote or local). On

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-13 Thread René Fournier
PHP Version 5.3.0 Directive Local Value Master Value allow_call_time_pass_reference Off Off allow_url_fopen On On 2009-12-14, at 12:26 AM, Gaurav Kumar wrote: What is the value for allow_url_fopen in your php.ini? It should be 1. 2009/12/13 René Fournier

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-12 Thread Gaurav Kumar
Hi Rene, The only thing which is a hurdle is that your system/computer is not allowing external connections. There seems to be nothing else wrong. I strongly suggest check your system firewall, any central server settings through which your system gets internet access, any antivirus s/w

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-12 Thread René Fournier
The thing is, the file_get_contents() fails the same way on local URLs -- that is, web sites hosted on the same machine. Or even using the machine's own IP address. On 2009-12-13, at 4:00 AM, Gaurav Kumar wrote: Hi Rene, The only thing which is a hurdle is that your system/computer is not

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-11 Thread René Fournier
Hi Gaurav, On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote: A very typical problem. Good you sent the error message. This problem can be caused due to one of the following- 1. I have faced similar problem due to local firewall settings. Don't think this is it, since (1) the firewall

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-10 Thread René Fournier
I thought error_reporting would display them, but I guess php.ini had them suppressed. Anyway, with: ?php error_reporting(-1); ini_set('display_errors', 1); set_time_limit(0); var_dump (file_get_contents ('http://www.google.com')); ? I get: Warning: file_get_contents(http://www.google.com):

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-10 Thread Gaurav Kumar
A very typical problem. Good you sent the error message. This problem can be caused due to one of the following- 1. I have faced similar problem due to local firewall settings. 2. Try some other domain; i.e. other than google com. Try some of the local area website with a particular page like

[PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread René Fournier
Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. Any call of file_get_contents() on a local file works fine -- the file is read and returned. But any call of file_get_contents on a url -- any url, local or remote -- always returns false. var_dump (file_get_contents

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread Richard Quadling
2009/12/9 René Fournier m...@renefournier.com: Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. Any call of file_get_contents() on a local file works fine -- the file is read and returned. But any call of file_get_contents on a url -- any url, local or remote -- always

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread kranthi
may be unrelated to your problem... but are you behind a proxy? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread LinuxManMikeC
On Wed, Dec 9, 2009 at 6:45 AM, René Fournier m...@renefournier.com wrote: Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. Any call of file_get_contents() on a local file works fine -- the file is read and returned. But any call of file_get_contents on a url -- any url,

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread LinuxManMikeC
On Wed, Dec 9, 2009 at 8:02 AM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Wed, Dec 9, 2009 at 6:45 AM, René Fournier m...@renefournier.com wrote: Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3. Any call of file_get_contents() on a local file works fine -- the file is

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread René Fournier
No. And it doesn't matter if the url is local (localhost, host.domain.com) or remote. On 2009-12-09, at 10:30 PM, kranthi wrote: may be unrelated to your problem... but are you behind a proxy?

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread René Fournier
It is, and I use curl elsewhere in the same script to fetch remote content. This exact same function works fine on my MacBook Pro (10.6 client, PHP 5.3), and *was* previously working fine under Server 10.4.11 and PHP 5.3, On 2009-12-09, at 11:10 PM, laruence wrote: try wget

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-09 Thread Richard Quadling
2009/12/9 René Fournier m...@renefournier.com: It is, and I use curl elsewhere in the same script to fetch remote content. This exact same function works fine on my MacBook Pro (10.6 client, PHP 5.3), and *was* previously working fine under Server 10.4.11 and PHP 5.3, On 2009-12-09, at 11:10