|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-06-20 20:41 UTC] 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. Patchesbugphp7ldap_connect (last revision 2017-06-20 20:47 UTC by brenocobra at gmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 12:00:01 2025 UTC |
The documentation clearly states that a list of URIs can be used. Not a list of IPs! This is the result on my local machine (sadly 3v4l.org hasn't ldap-extension installed) heiglandreas@172.20.10.4 ~ $ php -v PHP 7.1.8 (cli) (built: Aug 7 2017 15:02:45) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.5, Copyright (c) 1999-2017, by Zend Technologies heiglandreas@172.20.10.4 ~ $ php -a Interactive shell php > var_dump(ldap_connect('ldap://123.234.12.12 ldaps://12.23.34.45')); php shell code:1: resource(1) of type (ldap link) So it works perfectly with LDAP-URIs Adding a test would be appreciated though ;)