eagletech
If you have a test environment (with PHP 8.1) to debug with we can walk through the steps of debugging the issue here to maybe speed up the process. You'd first need to un-phar the plugin by cd
ing to your osTicket plugin directory on the webserver (eg. /path/to/osTicket/include/plugins/
) and running the following command:
php -r '$phar = new Phar("auth-ldap.phar"); $phar->extractTo("./auth-ldap");'
This will create a new folder called auth-ldap/
within your /path/to/osTicket/include/plugins/
folder containing the un-phared contents of the plugin. Once you have this, login to the database, go to the plugin table, find the record for the ldap plugin, set the install_path
to plugins/auth-ldap
(basically just remove the .phar
from the current value), set isphar
to 0
, and restart the webserver and PHP-FPM (if you're running it) to clear any file cache.
Now you will be running the un-phared plugin and you can add debug statements to the code that will reflect on screen or in your logs.
From here you can open include/plugins/auth-ldap/authentication.php
file, go to the authenticate()
method, and look for these specific lines.
Under the $r = $c->bind($dn, $password);
line and above the if (!PEAR::isError($r))
line add the following statement:
error_log(print_r($r, true));
Once you make the changes please save the file, tail the error logs on the webserver, attempt to login as a User via LDAP, and see what gets logged in your error logs. I'm going to bet this will be a PEAR error containing an error from the bind attempt. If you don't see anything being logged then it seems it's not even attempting LDAP auth.
Please note that the log may be put in your webserver error logs or PHP error logs or even the general server logs. It just depends on how you have PHP configured. You can look at your PHP INI file to see where error logs are being stored.
Cheers.