PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_LDAP » Bug #9677

Error with hostlist using php 5.2.0

Details

Submitted2006-12-22 09:56 UTC
Fromb dot hallinger at skyforcesystems dot de
Assignedbeni
StatusClosed
PackageNet_LDAP
PHP Version5.2.0
Roadmaps(Not assigned)

Comments

[2006-12-22 09:56 UTC] b dot hallinger at skyforcesystems dot de

Description:
------------
Net_LDAP complains the following:
"Please pass in an array of servers to Net_LDAP: "

I had no ldap-extension installed.
The problem is solved, if the ldap-extension is correctly inserted in the server.

This error should be catched, so the misleading error report is more clearly.

Test script:
---------------
require_once 'Net/LDAP.php';
$cfg = array(
'host' => 'ldap.example.com',
'port' => 389,
'version' => 3,
'starttls' => false,
'basedn' => 'dc=example,dc=com',
'filter' => '',
'scope' => 'sub',
);
$ldap = Net_LDAP::connect($cfg);
if(Net_LDAP::isError($ldap)) {
echo "ERROR: ".$ldap->getMessage();
exit;
}