file_get_contents errors on CentOS 5.3
Hi, I got a freshly installed CentOS 5.3 box and I'm getting this error:
Code:
file_get_contents(http://www.google.com) [function.file-get-contents]: failed to open stream: HTTP request failed! |
1. I'm guessing you've tried the basics, i.e. you have a working network connection and you can ping www.google.com?
2. Where are you seeing this error? Is this in a log somewhere or in your browser? Can you post more details on your question. Thanks. |
Assuming you mean the PHP function file_get_contents(), you need to check your php.ini configuration for:
allow_url_fopen = On allow_url_include = On If they're set to "Off", change them. And after you make the change(s) restart Apache. |
pazzport: yes i tried them. I tried wget-ting the file and I can get the file. Here's the error when I try it on the command line:
Code:
# php -r 'print_r(file_get_contents("http://mirror.facebook.net/centos/timestamp.txt"));' |
All times are GMT -5. The time now is 06:57 AM. |