Bug #74788 [Opn]: Cannot use ldap_connect passing a list of IPs
| From: | mcmic@php.net | Date: | Wed, 27 Sep 2017 15:37:54 +0000 |
| Subject: | Bug #74788 [Opn]: Cannot use ldap_connect passing a list of IPs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211398@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74788&edit=1
ID: 74788
Updated by: mcmic@php.net
Reported by: brenocobra at gmail dot com
-Summary: Falha ao executar ldap_connect passando uma lista de
servidores
+Summary: Cannot use ldap_connect passing a list of IPs
Status: Open
Type: Bug
Package: LDAP related
Operating System: Linux RHEL 7.0
PHP Version: 7.0.20
Block user comment: N
Private report: N
New Comment:
(just translating)
The problem reported is ldap_connect will fail when passed a list of IPs separated by spaces, while
this worked with PHP 5.3.
The english documentation for ldap_connect does indeed state that passing a list of URI is possible
(but not a list of IPs), so Iâll need to test this.
Quote: "You can also provide multiple LDAP-URIs separated by a space as one string"
There is no test for this in ext/ldap/tests so one should be added anyway as the feature is
documented.
Then this may need to be fixed if it is indeed not working.
Previous Comments:
------------------------------------------------------------------------
[2017-06-20 20:41:53] brenocobra at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.ldap-connect
---
No PHP Version 5.3.17 executo o ldap_connect passando uma lista de ip´s de servidores AD e a
função identificava o primeiro ativo e a partir deste teste já mando fazer o ldap_bind
neste servidor ativo.
No PHP Version 7.0.4 executo o ldap_connect passando uma lista de ip´s de servidores AD e recebo
o erro " ldap_connect(): Could not create session handle: Bad parameter to an ldap routine
"
"ESTE ERRO OCORRE APENAS QUANDO PASSO UMA "LISTA DE IP´S""
Test script:
---------------
if ($ds = ldap_connect("IP1 IP2 IP3")){
//Conectou OK em algum dos servidores da lista
...
}else{
// Não foi possÃvel conectar a nenhum servidor de AD
}
OBS.: em IP1, IP2 e IP3 passo o endereço IP dos respectivos servidores
Expected result:
----------------
Era esperado que com este teste (if ($ds = ldap_connect("IP1 IP2 IP3")){) fosse validado o
primeiro servidor de AD disponÃvel da lista que foi enviada como acontecia na versão 5.3.17.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74788&edit=1