KevinTheJedi
So with both PHP 8.1 and PHP 8.0 I am seeing the following when trying to log in as a client. It is a very long output so I've only included part of the output. This is the value contained in $r:
$r = $c->search(
$this->getSearchBase(),
sprintf('(|(userPrincipalName=%s)(samAccountName=%s))', $dn, $samid), $opts);
var_dump($r);
die();
object(PEAR_Error)#229 (8) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> int(1) ["message"]=> string(147) "LDAP_OPERATIONS_ERROR Parameters: Base: dc=example,dc=local Filter: (|(userPrincipalName=testuser@example.local)(samAccountName=testuser)) Scope: sub" ["userinfo"]=> NULL ["backtrace"]=> array(7) { [0]=> array(6) { ["file"]=> string(46) "/data2/var/www/itsupport/include/pear/PEAR.php" ["line"]=> int(533) ["function"]=> string(11) "__construct" ["class"]=> string(10) "PEAR_Error" ["type"]=> string(2) "->" ["args"]=> array(5) { [0]=> string(147) "LDAP_OPERATIONS_ERROR Parameters: Base: dc=example,dc=local Filter: (|(userPrincipalName=testuser@example.local)(samAccountName=testuser)) Scope: sub" [1]=> int(1) [2]=> int(1) [3]=> int(1024) [4]=> NULL } } [1]=> array(6) { ["file"]=> string(72) "/data2/var/www/itsupport/include/plugins/auth-ldap/include/Net/LDAP2.php" ["line"]=> int(1105) ["function"]=> string(10) "raiseError" ["class"]=> string(4) "PEAR" ["type"]=> string(2) "::" ["args"]=> array(2) { [0]=> string(147) "LDAP_OPERATIONS_ERROR Parameters: Base: dc=example,dc=local Filter: (|(userPrincipalName=testuser@example.local)(samAccountName=testuser)) Scope: sub" [1]=> int(1) } } [2]=> array(7) { ["file"]=> string(69) "/data2/var/www/itsupport/include/plugins/auth-ldap/authentication.php" ["line"]=> int(397) ["function"]=> string(6) "search" ["class"]=> string(9) "Net_LDAP2" ["object"]=> object(Net_LDAP2)#394 (14) { ["config":protected]=> array(14) { ["host"]=> string(10) "10.1.40.66" ["port"]=> int(389) ["version"]=> int(3) ["starttls"]=> bool(false) ["binddn"]=> string(0) "" ["bindpw"]=> string(0) "" ["basedn"]=> string(0) "" ["options"]=> array(4) { ["LDAP_OPT_TIMELIMIT"]=> int(5) ["LDAP_OPT_NETWORK_TIMEOUT"]=> int(5) ["LDAP_OPT_PROTOCOL_VERSION"]=> int(3) ["LDAP_OPT_REFERRALS"]=> int(0) } ["filter"]=> string(15) "(objectClass=*)" ["scope"]=> string(3) "sub" ["auto_reconnect"]=> bool(false) ["min_backoff"]=> int(1) ["current_backoff"]=> int(1) ["max_backoff"]=> int(32) } ["host_list":protected]=> array(1) { [0]=> string(10) "10.1.40.66" } ["down_host_list":protected]=> array(0) { } ["link":protected]=> resource(6) of type (ldap link) ["schema":protected]=> NULL ["schema_cache":protected]=> NULL ["schemaAttrs":protected]=> array(0) { } ["rootDSE_cache":protected]=> array(0) { } ["debug"]=> bool(false) ["default_error_mode"]=> NULL ["default_error_options"]=> NULL ["default_error_handler"]=> string(0) "" ["error_class"]=> string(15) "Net_LDAP2_Error" ["expected_errors"]=> array(0) { } } ["type"]=> string(2) "->" ["args"]=> array(3) { [0]=> string(18) "dc=example,dc=local" [1]=> string(69) "(|(userPrincipalName=testuser@example.local)(samAccountName=testuser))" [2]=> NULL } } [3]=> array(7) { ["file"]=> string(69) "/data2/var/www/itsupport/include/plugins/auth-ldap/authentication.php" ["line"]=> int(225) ["function"]=> string(13) "lookupAndSync" ["class"]=> string(18) "LDAPAuthentication" ["object"]=> object(LDAPAuthentication)#233 (2) { ["config"]=> object(LdapConfig)#205 (9) { ["table"]=> string(10) "ost_config" ["instance"]=> object(PluginInstance)#206 (9) { ["config_class":"PluginInstance":private]=> NULL ["_config"]=> RECURSION