I've installed auth-ldap.phar and it looks like it installs properly against my linux-based ldap host.
When trying to auth, it gives this error:
[Wed May 24 20:24:17.620378 2023] [php:error] [pid 68015] [client 172.18.14.145:59442] PHP Fatal error: Cannot redeclare flatten() (previously declared in /var/www/html/osticket/upload/include/plugins/auth-ldap/authentication.php:3) in phar:///var/www/html/osticket/upload/include/plugins/auth-ldap.phar/authentication.php on line 3

It looks like it's missing ../include/NET/LDAP2.php and other files.

Note: v 1.17 stable, using auth-ldap.phar 0.6.2

Also, additional error:

[Wed May 24 22:15:59.432355 2023] [php:error] [pid 1585] [client 172.18.14.145:61406] PHP Fatal error: Uncaught Error: Call to a member function bind() on null in phar:///var/www/html/osticket/upload/include/plugins/auth-ldap.phar/authentication.php:223\nStack trace:\n#0 phar:///var/www/html/osticket/upload/include/plugins/auth-ldap.phar/authentication.php(479): LDAPAuthentication->authenticate()\n#1 /var/www/html/osticket/upload/include/class.auth.php(341): ClientLDAPAuthentication->authenticate()\n#2 /var/www/html/osticket/upload/login.php(51): AuthenticationBackend::process()\n#3 {main}\n thrown in phar:///var/www/html/osticket/upload/include/plugins/auth-ldap.phar/authentication.php on line 223, referer: http://osticket.foo.comi/login.php
[Wed May 24 22:15:59.432440 2023] [php:error] [pid 1585] [client 172.18.14.145:61406] PHP Fatal error: Uncaught TypeError: ldap_close(): Argument #1 ($ldap) must be of type resource, bool given in phar:///var/www/html/osticket/upload/include/plugins/auth-ldap.phar/include/Net/LDAP2.php:701\nStack trace:\n#0 phar:///var/www/html/osticket/upload/include/plugins/auth-ldap.phar/include/Net/LDAP2.php(701): ldap_close()\n#1 /var/www/html/osticket/upload/include/pear/PEAR.php(755): Net_LDAP2->_Net_LDAP2()\n#2 [internal function]: _PEAR_call_destructors()\n#3 {main}\n thrown in phar:///var/www/html/osticket/upload/include/plugins/auth-ldap.phar/include/Net/LDAP2.php on line 701, referer: http://osticket.foo.com/login.php

Looks great - I'm running PHP-8.0 and 1..17.3.
How do I download this? I don't see a means to clone it.....

It's erroring out with
Failed opening required 'include/Net/LDAP2.php' (include_path='./:/var/www/html/osticket/upload/include/:/var/www/html/osticket/upload/include/pear/:/var/www/html/osticket/upload/include/plugins/auth-ldap/include')

    Ah, I used the older link. I'll re-install and test. Thank you!

    Well. The new phar file is installed without error, thanks.
    Now, users log in but the application doesn't open - it's returning to a login screen after flashing up a brief "Please wait - it will take a second" window.

    The apache2 error log isn't showing errors, and the access log captures login attempts.
    /var/log/php.....log doesn't show any errors either.

    Any ideas? TIA for any guidance.

    Using v 17.3 and the auth-ldap.phar file you linked to above (says 0.6.2)

      mhayden-dmatrix

      Clear the cache and cookies and try again. Otherwise you'll have to check the User's Auth backend in the db to see if they are locked in to a specific auth method.

      Cheers.

      It authenticates local users but not ldap users.
      Looking in the DB to determine whether or not specific auth methods are locked.

      I don't know what to expect from LDAP with osticket. Should the database autopopulate from ldap? Do I still need to create users?

      Updated PHP to 8.1
      Now it accepts ldap password but after logging in, we get a white screen.
      Making headway, festina lente...thank you

      @KevinTheJedi
      Thank you!
      That was the last bit to get us to the finish line.
      Installed PHP8.1 and made sure to update php-8.1-ldap, and it began working.
      My manager is DELIGHTED.
      Grazie, grazie infinitamente!

      Write a Reply...