Page MenuHomePhorge

kolab-webadmin: Uncaught Exception: Serialization of 'LDAP\Connection' is not allowed
Closed, ResolvedPublic

Description

I'm running kolab-webadmin just tagged release 3.2.17 in Debian12 with PHP 8.2.24.

I get this in /var/log/kolab-webadmin/errors (besides lots of deprecation messages):

[27-Oct-2024 16:06:40 UTC] PHP Fatal error:  Uncaught Exception: Serialization of 'LDAP\Connection' is not allowed in [no active file]:0
Stack trace:
#0 {main}
  thrown in [no active file] on line 0

I'm running php8.2-fpm, in case that matters.

Details

Ticket Type
Task

Event Timeline

Maybe something like this would help:

diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index f5e33b2..2db826e 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -122,6 +122,12 @@ class LDAP extends Net_LDAP3 {
         $this->config_set("root_dn", $root_dn);
     }
 
+    public function __sleep()
+    {
+        $this->close();
+        return [];
+    }
+
     /**********************************************************
      ***********          Public methods           ************
      **********************************************************/

This patch fixes the login for me - thanks a lot.

There are now some further deprecation warning - I'll open a new ticket for them. This is for now just looking around in kolab-webadmin, not doing any changes.

machniak claimed this task.

Patch merged.