I'm updated osTicket to 17.2 and set PHP version to 8.1. After this i saw problem with authentification with LDAP. Registred users cant login (have error about access denided) and new users get 500 error on page /login.php after login istead of page with new user info.
I tried a lot and thought about i have problem with my LDAP (MS AD) server. After few hours i tried last option — change PHP to 8.0. And now all works great.

What a problem with LDAP authentification on PHP 8.1?

    refrain

    No idea, please do some debugging and let us know what you find. I was never able to replicate any LDAP issues with PHP 8.1. If you find any errors, etc. please let us know!

    Cheers.

    18 days later

    also did you upgrade your authentication ldap and ad plugin?

    10 days later

    I can confirm this happens in PHP 8.1 and not 8.0. I can see this in the PHP error log:

    #3 /.../public_html/login.php(51): AuthenticationBackend::process()
    #4 {main}
    thrown in phar:///.../public_html/include/plugins/auth-ldap.phar/authentication.php on line 390
    [12-Dec-2022 18:01:04 UTC] PHP Fatal error: Uncaught Error: Call to a member function dn() on bool in phar:///.../public_html/include/plugins/auth-ldap.phar/authentication.php:246
    Stack trace:
    #0 phar:///.../public_html/include/plugins/auth-ldap.phar/authentication.php(430): LDAPAuthentication->authenticate()
    #1 /.../public_html/include/class.auth.php(341): StaffLDAPAuthentication->authenticate()
    #2 /.../public_html/scp/login.php(71): AuthenticationBackend::process()
    #3 {main}
    thrown in phar:///.../public_html/include/plugins/auth-ldap.phar/authentication.php on line 246

    Additionally, this is the PHP documentation for the LDAP functions:

    8.1.0 The ldap parameter expects an LDAP\Connection instance now; previously, a resource was expected.
    8.1.0 Returns an LDAP\Result instance now; previously, a resource was returned.

    Not sure if that has something to do with the problem.

    I can see the auth-ldap plugin uses Net_LDAP2, which is not maintained anymore, and the last release was in 2015.

      equistango

      We've always used that package; this package will be replaced in v2.0. Also, I'm using the latest build of the LDAP plugin with v1.17.2 and PHP 8.1 and have zero issues. So something has to be going on in your instance/setup. Either your core code isn't fully updated or you are using a borked/older version of the LDAP plugin or something is weird with your PHP setup.

      Cheers.

      10 days later

      Hi,
      we have the same Problem as @equistango
      With PHP 8.0 it works. 8.1 and 8.2 not (HTTP 500).
      Occures with two instances. One of them is a fresh install!

      Did you find a solution @equistango

      4 days later

      We have similar problem with php 8.1 downgrade to 8.0 resolve problems with plugins.

        margol

        You will need to provide any errors for us to debug. I can use PHP 8.1 with no issues.

        Cheers.

        Red_Peace

        Typically you need to check all logs (general server logs, webserver error logs, PHP error logs, MySQL/MariaDB error logs, osTicket System Logs, Browser Console logs, etc.).

        Cheers.

        11 days later

        Same issue and downgrading PHP from 8.1 to 8.0 resolved it.

        Write a Reply...