philbertphotos / osticket-multildap-auth-plugin

Plugin for OS Ticket that allows for authentication with multiple domains.
GNU General Public License v3.0
28 stars 17 forks source link

Plugin doesn't work with php7.x #29

Closed KroonCo closed 2 years ago

KroonCo commented 5 years ago

I'm really interested in using this plugin, unfortunately it doesn't work with the following configuration: osTicket: v1.12 (a076918) (Clean installation) OS: Ubuntu server 18.04.2 Apache: 2.4.29 PHP: 7.2.17-0ubuntu0.18.04.1

The plugin does partially work when setting the PHP version to 5.6, however for the agent login there is an error checking the security group:

PHP Fatal error: Call to a member function checkGroup() on null in /var/www/osticket/include/plugins/multi-ldap/auth.php on line 591, referer: http://ticket.test.nl/scp/login.php

I believe this is already addressed in #23

When setting the PHP version to 7.2 the following errors appear.

PHP Warning: Declaration of SyncLDAPMultiClass::getconfig($id) should be compatible with LDAPMultiAuthentication::getConfig() in /var/www/osticket/scp/sync_mldap.php on line 0, referer: http://ticket.test.nl/scp/login.php

PHP Warning: Use of undefined constant OST_ROOT - assumed 'OST_ROOT' (this will throw an Error in a future version of PHP) in /var/www/osticket/include/plugins/multi-ldap/config.php on line 324, referer: http://ticket.test.nl/scp/login.php

PHP Warning: ldap_connect(): Could not create session handle: Bad parameter to an ldap routine in /var/www/osticket/include/plugins/multi-ldap/class.AuthLdap.php on line 132, referer: http://ticket.test.nl/scp/login.php

PHP Warning: ldap_set_option(): supplied argument is not a valid ldap link resource in /var/www/osticket/include/plugins/multi-ldap/class.AuthLdap.php on line 133, referer: http://ticket.test.nl/scp/login.php

philbertphotos commented 4 years ago

I have a patch that fixes this that will be uploaded after I clean up a few things.

danielouton commented 4 years ago

I have a patch that fixes this that will be uploaded after I clean up a few things.

@philbertphotos Are you updating the plugin soon?

edozier commented 4 years ago

Any updated on the patch? I'm having the same issue.

edozier commented 4 years ago

@philbertphotos Do you have an update on the patch? I'm having the same issue.

edozier commented 4 years ago

@garcia567 Did you get it working?

philbertphotos commented 3 years ago

Now works.

joshabts commented 3 years ago

Curious if this functionality reverted. Running fresh osTIcket 1.15 install with php 7.4 and seeing the same initial error of:

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function checkGroup() on null in /var/www/html/include/plugins/multi-ldap/auth.php:593\nStack trace:\n#0 /var/www/html/include/plugins/multi-ldap/auth.php(571): LDAPMultiAuthentication->authOrCreate()\n#1 /var/www/html/include/plugins/multi-ldap/auth.php(801): LDAPMultiAuthentication->authenticate()\n#2 /var/www/html/include/class.auth.php(249): StaffLDAPMultiAuthentication->authenticate()\n#3 /var/www/html/scp/login.php(71): AuthenticationBackend::process()\n#4 {main}\n thrown in /var/www/html/include/plugins/multi-ldap/auth.php on line 593', referer: http://mlosticket.marketlab.com/scp/login.php

I appear to be getting a valid authentication response because I can see the login event on the AD domain controller.

philbertphotos commented 3 years ago

That is a interesting error let me test this and get back too you.

ottotivadar commented 3 years ago

Hello! Just wanted to report: we faced the same issue, with the same error. Info: osTicket Version | v1.12 (a076918) Web Server | Apache/2.4.29 (Ubuntu) MySQL | 5.7.34 PHP version | 7.2.24-0ubuntu0.18.04.7

philbertphotos commented 2 years ago

Fixed works with php 8.0