PHP5 giving failed to open stream: HTTP request failed error when using fopen.
Posted
by
mickey
on Server Fault
See other posts from Server Fault
or by mickey
Published on 2011-01-05T20:24:57Z
Indexed on
2011/01/05
20:55 UTC
Read the original article
Hit count: 266
Hello everyone.
This problem seems to have been discussed in the past everywhere on google and here, but I have yet to find a solution.
A very simple fopen gives me a
PHP Warning: fopen(http://www.google.ca): failed to open stream: HTTP request failed!".
The URL I am fetching have no importance because even when I fetch http://www.google.com it doesnt work. The exact same script works on different server. The one failing is Ubuntu 10.04 and PHP 5.3.2. This is not a problem in my script, it's something different in my server or it might be a bug in PHP.
I have tried using a user_agent in php.ini but no success. My allow_url_fopen is set to On.
If you have any ideas, feel free!
© Server Fault or respective owner