DirectoryTree / LdapRecord

A fully-featured LDAP framework.
https://ldaprecord.com
MIT License
500 stars 44 forks source link

[Support] ldap_search(): Search: Can't contact LDAP server #695

Closed ceicomcloud closed 6 months ago

ceicomcloud commented 6 months ago

Hi,

I have an error if i try to authenticate an user:

ldap_search(): Search: Can't contact LDAP server {"exception":"[object] (LdapRecord\LdapRecordException(code: 2):

But: ldap:test as a result success any idea ?

 'connections' => 
[
        'default' => [
            'hosts' => [env('LDAP_HOST', '10.10.50.1')],
            'username' => env('LDAP_USERNAME', 'CN=Administrateur,CN=Users,DC=******,DC=fr'),
            'password' => env('LDAP_PASSWORD', '************'),
            'port' => env('LDAP_PORT', 636),
            'base_dn' => env('LDAP_BASE_DN', 'DC=******,DC=fr'),
            'timeout' => env('LDAP_TIMEOUT', 5),
            'follow_referrals' => false,
            'use_ssl' => env('LDAP_USE_SSL', true),
            'use_tls' => env('LDAP_USE_TLS', false),
            'options' => [
                LDAP_OPT_X_TLS_REQUIRE_CERT => LDAP_OPT_X_TLS_NEVER
            ],

        ],
image
stevebauman commented 6 months ago

Hi @ceicomcloud,

Can you try the php artisan ldap:browse command to see if that works as well?

stevebauman commented 6 months ago

Closing due to inactivity.