[Kolab-devel] Chwala bugfix for login on non-standard port

Frank Bergmann <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <20140713082816.GA17039__9421.73746084354$1405240112$gmane$org@treferpol.tuxad.net>
Hi,

I had a problem on chwala login showing "Interner Systemfehler" and
PHP Error: Login failed. Unable to connect to ssl://glas-fritz.com:443. Error #111: Connection refused (POST)
in /var/log/chwala/errors.

Setup: Kolab 3.2, Router with port forwarding from Port 8443 to the
internal kolab server with also port 8443

It took some time to find the location, where the port was "lost".
My Fix:

[root@srv ~]# cat kolab_3.2_chwala_missing_port_unable_to_connect_interner_systemfehler.patch
--- /usr/share/chwala/lib/file_ui.php.orig	2013-11-19 10:46:44.000000000 +0100
+++ /usr/share/chwala/lib/file_ui.php	2014-07-13 04:23:23.531215786 +0200
@@ -134,6 +134,7 @@
         if (!$url) {
             $url = rcube_utils::https_check() ? 'https://' : 'http://';
             $url .= $_SERVER['SERVER_NAME'];
+            $url .= ":" . $_SERVER["SERVER_PORT"];
             $url .= preg_replace('/\/?\?.*$/', '', $_SERVER['REQUEST_URI']);
             $url .= '/api/';
         }

Without this patch HTTP_Request2_Adapter_Socket->connect() doesn't get a
port number and set it to the default 443 because of https prefix.

best regards,
Frank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.