Re: LDAP2 Protocol Issue

From: Date: Thu, 08 Jan 2009 21:37:43 +0000
Subject: Re: LDAP2 Protocol Issue
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29573@lists.php.net to get a copy of this message
The server is running OpenLDAP 2.3.41. I can't tell you much more than that, as the server is run by someone else. I am able to connect and bind in a script that I created, so I know it works. Here is the code that I have. I think it's based off of the example from the pear website. // Inclusion of the Net_LDAP package: require_once 'Net/LDAP2.php'; // The configuration array: $config = array (
    'binddn'    => 'cn=user,ou=Organizations,o=mycompany,c=US',
    'bindpw'    => 'password',
    'basedn'    => 'ou=People,o=mycompany,c=US',
    'host'      => 'ldaps://myserver.com',
    'port'	=> 636
); // Connecting using the configuration: $ldap = Net_LDAP2::connect($config); // Testing for connection error if (PEAR::isError($ldap)) {
    die('Could not connect to LDAP-server: '.$ldap->getMessage());
} On Jan 8, 2009, at 3:29 PM, Daniel O'Connor wrote:
On Fri, Jan 9, 2009 at 7:48 AM, Mike Tuller <mituller@umn.edu> wrote: I am attempting to use the LDAP2 package, but when I use it, I get back the following error: Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/share/php/Net/LDAP2.php on line 1169 Could not connect to LDAP-server: LDAP Server does not support protocol version 3: I know that the ldap server does support version 3, so I am not sure what the problem is. I did a search and couldn't find the answer, so I am asking here. 1) What's the server software? 2) Can you get it down to a very small test case? 3) Could you perhaps get the package to var_dump() any responses when it causes the failure? If so; I'd say lodge a bug :)


« previous php.pear.general (#29573) next »