From 768e33a7955bd6f73c33363533843e41a720d29c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 21 Dec 2012 18:41:41 +0100 Subject: Add warning in default_host description, so after change update of users table is needed (#1486386) --- config/main.inc.php.dist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index caa2ea881..20b8795e1 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -63,8 +63,8 @@ $rcmail_config['smtp_debug'] = false; // IMAP // ---------------------------------- -// the mail host chosen to perform the log-in -// leave blank to show a textbox at login, give a list of hosts +// The mail host chosen to perform the log-in. +// Leave blank to show a textbox at login, give a list of hosts // to display a pulldown menu or set one host as string. // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls:// // Supported replacement variables: @@ -73,6 +73,8 @@ $rcmail_config['smtp_debug'] = false; // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) // %s - domain name after the '@' from e-mail address provided at login screen // For example %n = mail.domain.tld, %t = domain.tld +// WARNING: After hostname change update of mail_host column in users table is +// required to match old user data records with the new host. $rcmail_config['default_host'] = ''; // TCP port used for IMAP connections -- cgit v1.2.3 From 7d88e614aec9d6dd3bfb6b85c774e2a53b741948 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 22 Dec 2012 15:42:14 +0100 Subject: Add hint about possible disabled fsockopen() function on connection error --- program/lib/Roundcube/rcube_imap_generic.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 112e91350..59a444da7 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -753,12 +753,16 @@ class rcube_imap_generic $this->fp = @fsockopen($host, $this->prefs['port'], $errno, $errstr, $this->prefs['timeout']); if (!$this->fp) { + if (!$errstr) { + $errstr = "Unknown reason (fsockopen() function disabled?)"; + } $this->setError(self::ERROR_BAD, sprintf("Could not connect to %s:%d: %s", $host, $this->prefs['port'], $errstr)); return false; } - if ($this->prefs['timeout'] > 0) + if ($this->prefs['timeout'] > 0) { stream_set_timeout($this->fp, $this->prefs['timeout']); + } $line = trim(fgets($this->fp, 8192)); -- cgit v1.2.3