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

Frank Bergmann kolab at tuxad.com
Sun Jul 13 10:28:16 CEST 2014


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 at 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



More information about the devel mailing list