So I am trying to resolve an issue with my companies server status script that we use to monitor a number of servers. It checks using cron and gets the load averages for each server by using the file() command to access a server side php file that reports the load avg. ANYWAY.. I'm getting this error when accessing ONLY ONE of the servers: PHP Warning: file(http://IPADDRESS:80/server_script.php): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found Code (markup): Out of ~30 servers only one is causing this error. I've checked the firewall on the server causing the error and thats not the issue. I've flushed DNS on the checking server and the server causing the error. Even stranger, using wget http://IPADDRESS:80/server_script.php Code (markup): through the shell works just fine. Has anyone experienced anything like this??
Is each server setup exactly the same? Are you getting any specific error? Is it possible that file() is being disabled on the one server that's having problems?
All servers are set up pretty much the same, yes. I can't think of any settings that would disable only that one command from working for only one server.
Issue is resolved now thanks for the suggestions. It turned out to be a misconfiguration with httpd.conf (a mod_security issue).