I just had the same issue. LDAP on 1.17 would not work with PHP8.1. Downgrade to PHP8.0 fixed the problem immediately.
[Mon Nov 28 13:45:27.081667 2022] [php:error] [pid 28428] [client 172.22.1.17:57339] PHP Fatal error: Uncaught Error: Call to undefined method PEAR_Error::getValue() in phar:///var/www/osticket/include/plugins/auth-ldap.phar/authentication.php:265\nStack trace:\n#0
phar:///var/www/osticket/include/plugins/auth-ldap.phar/authentication.php(193): LDAPAuthentication->getSchema()\n#1 phar:///var/www/osticket/include/plugins/auth-ldap.phar/authentication.php(430): LDAPAuthentication->authenticate()\n#2 /var/www/osticket/include/clas
s.auth.php(341): StaffLDAPAuthentication->authenticate()\n#3 /var/www/osticket/scp/login.php(71): AuthenticationBackend::process()\n#4 {main}\n thrown in phar:///var/www/osticket/include/plugins/auth-ldap.phar/authentication.php on line 265, referer: https://FQDN/osticket/scp/login.php
[Mon Nov 28 13:58:24.191667 2022] [php:error] [pid 34483] [client 172.22.1.17:57575] PHP Fatal error: Uncaught Error: Call to a member function bind() on null in phar:///var/www/osticket/include/plugins/auth-ldap.phar/authentication.php:223\nStack trace:\n#0 phar://
/var/www/osticket/include/plugins/auth-ldap.phar/authentication.php(479): LDAPAuthentication->authenticate()\n#1 /var/www/osticket/include/class.auth.php(341): ClientLDAPAuthentication->authenticate()\n#2 /var/www/osticket/login.php(51): AuthenticationBackend::proces
s()\n#3 {main}\n thrown in phar:///var/www/osticket/include/plugins/auth-ldap.phar/authentication.php on line 223, referer: https://FQDN/osticket/login.php
[Mon Nov 28 13:58:24.191758 2022] [php:error] [pid 34483] [client 172.22.1.17:57575] PHP Fatal error: Uncaught TypeError: ldap_close(): Argument #1 ($ldap) must be of type LDAP\\Connection, bool given in phar:///var/www/osticket/include/plugins/auth-ldap.phar/includ
e/Net/LDAP2.php:701\nStack trace:\n#0 phar:///var/www/osticket/include/plugins/auth-ldap.phar/include/Net/LDAP2.php(701): ldap_close()\n#1 /var/www/osticket/include/pear/PEAR.php(755): Net_LDAP2->_Net_LDAP2()\n#2 [internal function]: _PEAR_call_destructors()\n#3 {mai
n}\n thrown in phar:///var/www/osticket/include/plugins/auth-ldap.phar/include/Net/LDAP2.php on line 701, referer: https://FQDN/osticket/login.php