Closed pincopallino2015 closed 1 year ago
Hi @pincopallino2015, do you mean the LDAP_HOST
environment variable?
If so, this is because the hosts
value inside of the config is already wrapped inside of an array. You must reformat the ldap.php
config file hosts
value to the below structure:
<?php
return [
'connections' => [
'default' => [
- 'hosts' => [env('LDAP_HOST', '127.0.0.1')],
+ 'hosts' => explode(',', env('LDAP_HOST', '127.0.0.1')),
// ...
],
],
// ...
];
Then, inside your .env
, you can comma separate your hosts to use multiple:
LDAP_HOST=127.0.0.1,127.0.0.2
The LDAP_HOST
variable is named singularly (not LDAP_HOST(S)
) to indicate this.
Let me know if that works for you 👍
Thanks a lot @stevebauman, now it works. 👍
Excellent! Thanks for following up @pincopallino2015 👍
Hello, If I set two domain controllers in the LDAP_HOST variable I get this error message: Cannot assign array to property LdapRecord\Connection::$host of type string. If I declare the $host property in the Connection class as an array or nothing like the old 2.x version everything works fine