I am having the same issue with a new install of Roundcube. I attempt to log in and the webpage say "Connection to IMAP server failed"
My log file shows:
[18-Apr-2008 18:21:24] PHP Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:143 (Permission denied) in /var/www/html/webmail/program/lib/imap.inc on line 468
[18-Apr-2008 18:21:24 +0000] IMAP Error: Could not connect to 127.0.0.1 at port 143: Permission denied in on line 0I have tried the FQN, using localhost and box the local and public IP addresses in the config to no avail.
I can telnet from the box to 127.0.0.1:143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK Server ready.No issue with it being blocked, in fact I haven't even enabled the firewall on this system yet.
I also attempted to modify the fsockopen timout in program/lib/imap.inc ... nada.
I attempted to test this connection by using a test page:
<?php
$host = 'localhost';
$port = 143;
$timeout = 30;
$IMAP = fsockopen($host, $port, $errno, $errstr, $timeout);
if(!$IMAP){
print("ERROR Number: ".$errno. '<br />Error String: '. $errstr);
}else{
echo 'Everything is fine with PHPs fsockopen() function.';
}
fclose($IMAP);
?>
The results of which were for the most part, the same as those generated by RoundCube:
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:143 (Permission denied) in /var/www/html/test.php on line 6
ERROR Number: 13
Error String: Permission deniedThis leads me to believe that the issue is PHP based, but I am not sure what the problem could be.
I checked my php.ini to make sure that allow_url_fopen was set to On and have tried to modify the user_agent with no luck.
The system in question is a RedHat Enterprise Linux 5 x86_64 machine using:
Apache/HTTPD 2.2.3-11
PHP 5.1.6-15
Dovecot 1.0-1.2
All patches and packages are up to date.
So, I am at a bit of a loss. I want to get this up and running, because it is a much better, IMO, option than squirelmail or the like, but if I can't get past this I may have to go with something else.
Any help would be greatly appreciated.
Thanks.
cW