Aha...
following your suggestion I changed the line to:
my $pop = Net::POP3->new($pop3) or die "Unable to connect: $!";
Which returned:
Unable to connect: Connection timed out at /home/xxx/xxx/DeletePopMail.pl line 19
Now all I have to do is work out why I can connect from my PC but not via the webserver!
Thanks for the useful reply, much appreciated.
| [reply] [d/l] |
I ran into a similar problem (CGI script unable to access the network) and discovered that it stemmed in my case from SELinux, the NSA's secured Linux kernel. It is built into Fedora from core 3 onwards, as well as some other distros, and is installed on many individual servers besides.
If you determine that you are running selinux (try the command /usr/sbin/selinuxenabled (default path). If it returns 0, you have it), it has a variable called httpd_can_network_connect. Set this to 1 and selinux will stop blocking CGI network connections.
| [reply] [d/l] [select] |
--> discovered that it stemmed in my case from SELinux
And thus, this is the reason that I choose to completely avoid SELinux. Know though, that during the installation of Linux ( Fedora) you have the option of enabling or not enabling SELinux. Personally, I choose not to because of the extremely restrictive nature of SELinux. Granted, if you are trying to comletely secure a machine then it might be for you, but not the average user.
#jlk
Every time Linux boots, a penguin gets its wings.
| [reply] |