simpleSAMLphp Exception: No module named 'ldap' has been installed

136 Views Asked by At

Really struggling to find a solution for this problem. I am trying to configure my simpleSAMLphp server to use LDAP for authentication, but am getting exceptions originating from the 'ldap' module.

My definition of the LDAP authentication source in the authsources.php, looks like the following:

'ldapauth' => [
        'ldap:LDAP',
        'hostname' => 'ldap.saml.com',
        'port' => 389,

        ...
],

Apparently, 'ldap:LDAP' triggers the exception to occur, the module can not be found. PHP shows the module as enabled.

SimpleSAML\Error\Error: UNHANDLEDEXCEPTION
Backtrace:
2 public/_include.php:28 (SimpleSAML_exception_handler)
1 vendor/symfony/error-handler/ErrorHandler.php:607 (Symfony\Component\ErrorHandler\ErrorHandler::handleException)
0 [builtin] (N/A)
Caused by: Exception: No module named 'ldap' has been installed.
Backtrace:
8 src/SimpleSAML/Module.php:446 (SimpleSAML\Module::resolveClass)
7 src/SimpleSAML/Auth/Source.php:315 (SimpleSAML\Auth\Source::parseAuthSource)
6 src/SimpleSAML/Auth/Source.php:358 (SimpleSAML\Auth\Source::getById)
5 src/SimpleSAML/Auth/Simple.php:67 (SimpleSAML\Auth\Simple::getAuthSource)
4 src/SimpleSAML/Auth/Simple.php:156 (SimpleSAML\Auth\Simple::login)
3 [builtin] (call_user_func_array)
2 src/SimpleSAML/HTTP/RunnableResponse.php:72 (SimpleSAML\HTTP\RunnableResponse::sendContent)
1 vendor/symfony/http-foundation/Response.php:394 (Symfony\Component\HttpFoundation\Response::send)
0 public/module.php:14 (N/A)
1

There are 1 best solutions below

2
YetiCGN On

The ldap PHP extension that you might find in an output from phpinfo(); is different from the LDAP module of simpleSAMLphp. Try installing and activating that.