Friday, October 3, 2008

Can't connect to www.yahoo.com:80 (Bad hostname 'www.yahoo.com').


Share at Facebook

You may see this error if you are an unfortunate guy for that particular day. This is an error that used to come from your CGI script. Actually while you are trying to connect a remote host using a Perl/Python script. And you are executing the script from another script using System command.

The reason behind this, you are running the main script under `apache` user. And under that user you are trying to execute such a script that is going to connect another remote location (Spidering or data fetching).

Your SELinux is enabled, and you have to turn off. To do so, below is the command

setenforce 0
After disabled the SELinux, you can execute the script that you tried before.




No comments: