Hello there.
I'm trying to configure LDAP authentication on my faq. After editing the ldap config file, I am able to know that it works, but I don't pass through authentication.
Explaining, I have an account on my LDAP server and another account on the faq with the same username. If I try enter with my username and my faq password, it works. If I enter a wrong password (different of my ldap's and faq's password), I got a wrong username or password message. But if I enter the username and the correct LDAP password, I got a 500 error code, with the chrome's default error screen. When testing with prefix (server\user), same thing happens.
I assume that the LDAP authentication is working, because I only get an error when I enter the right LDAP credentials, so the application is able to check if my password is correct or not, showing the right message for wrong password when needed.
Any ideas?
[Solved] LDAP works, but don't
Moderator: Thorsten
[Solved] LDAP works, but don't
Last edited by etcho on Wed Jul 14, 2021 5:49 pm, edited 1 time in total.
Re: LDAP works, but don't
Hi,
could you please enable the debug mode in src/Bootstrap.php and try it again?
bye
Thorsten
could you please enable the debug mode in src/Bootstrap.php and try it again?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: LDAP works, but don't
Hi. Thanks for the reply.
Here is the error message:
phpMyFAQ Fatal error
Uncaught exception: 'TypeError'
Message: 'Argument 2 passed to phpMyFAQ\User::createUser() must be of the type string, null given, called in /var/www/html/dds/phpmyfaq/src/phpMyFAQ/Auth/AuthLdap.php on line 82'
Stack trace:
#0 /var/www/html/dds/phpmyfaq/src/phpMyFAQ/Auth/AuthLdap.php(82): phpMyFAQ\User->createUser()
#1 /var/www/html/dds/phpmyfaq/src/phpMyFAQ/Auth/AuthLdap.php(192): phpMyFAQ\Auth\AuthLdap->create()
#2 /var/www/html/dds/phpmyfaq/src/phpMyFAQ/User/CurrentUser.php(211): phpMyFAQ\Auth\AuthLdap->checkCredentials()
#3 /var/www/html/dds/phpmyfaq/admin/index.php(156): phpMyFAQ\User\CurrentUser->login()
#4 {main}
Thrown in '/var/www/html/dds/phpmyfaq/src/phpMyFAQ/User.php' on line 449
Here is the error message:
phpMyFAQ Fatal error
Uncaught exception: 'TypeError'
Message: 'Argument 2 passed to phpMyFAQ\User::createUser() must be of the type string, null given, called in /var/www/html/dds/phpmyfaq/src/phpMyFAQ/Auth/AuthLdap.php on line 82'
Stack trace:
#0 /var/www/html/dds/phpmyfaq/src/phpMyFAQ/Auth/AuthLdap.php(82): phpMyFAQ\User->createUser()
#1 /var/www/html/dds/phpmyfaq/src/phpMyFAQ/Auth/AuthLdap.php(192): phpMyFAQ\Auth\AuthLdap->create()
#2 /var/www/html/dds/phpmyfaq/src/phpMyFAQ/User/CurrentUser.php(211): phpMyFAQ\Auth\AuthLdap->checkCredentials()
#3 /var/www/html/dds/phpmyfaq/admin/index.php(156): phpMyFAQ\User\CurrentUser->login()
#4 {main}
Thrown in '/var/www/html/dds/phpmyfaq/src/phpMyFAQ/User.php' on line 449
Re: LDAP works, but don't
Hi,
which version do you use?
bye
Thorsten
which version do you use?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: LDAP works, but don't
I'm currently on 3.1.0-beta, but it had the same behavior before I installed the beta version.
Re: LDAP works, but don't
Hi,
that should fix your errors: https://github.com/thorsten/phpMyFAQ/commit/eb948a809b698fd2aac1e851d457057b63125bb8
Thanks for testing the beta!
bye
Thorsten
that should fix your errors: https://github.com/thorsten/phpMyFAQ/commit/eb948a809b698fd2aac1e851d457057b63125bb8
Thanks for testing the beta!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: LDAP works, but don't
Thanks, Thorsten. It solved the problem.