|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15389 slow ldap connect
Submitted: 2002-02-05 12:51 UTC Modified: 2002-10-08 11:50 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: martin at kouba dot at Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.1.1 OS: w2k advanced server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: martin at kouba dot at
New email:
PHP Version: OS:


 [2002-02-05 12:51 UTC] martin at kouba dot at
i tried the ldap functions with php 4.0.6 and now with 4.1.1.

the ldap queries are super fast, but the connect takes 4 to 5 seconds.

first i thought it was the queries but when i removed the queries the script would still take the same time to execute. the queries would only take about 1 second to compute.

i already use the ip address of the ldap server for the connect to avoid dns lookups.

i understand that any connect procedure takes a while but for the user to wait for 5 seconds is much too long.

is there a way to optimize the connect procedure?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-06 07:36 UTC]
Are you sure this is a problem with PHP and not with your network?
Try connecting to the server with another client.

 [2002-02-06 17:51 UTC] martin at kouba dot at
i tried this on 3 different machines (1x nt4 ws; 1x w2k ws; 1x w2k srv)

of course it can be that it is the novell server that causes the delay but since this is a high performance machine (>1000 clients) i haven't thought about that yet.

everything is connected via switched 100mbit (or better) full duplex.

do you have experiences with php ldap and nds?
 [2002-02-06 18:05 UTC]
If you have a small script for me to test, that I can run as a non-administrator user on the NDS. I might be able to check it.

 [2002-02-06 18:17 UTC] martin at kouba dot at
$start = date("U");

$server = "x.x.x.x"; // ip address of nds-server

$ds = ldap_connect($server);

$end = date("U");
echo "<br>".($end-$start)." Sekunden<br>";
 [2002-02-07 17:33 UTC]
Have you tried to connect to the LDAP server with something
else than PHP? Some other LDAP client, or even telnet to
the LDAP port? One possibility is that the LDAP server
spends some time trying to lookup the clients hostname in
order to check access or log the name.

 [2002-02-08 09:19 UTC] martin at kouba dot at
yes, i've tried to connect with the ldap addressbook of groupwise 6 (connect in less than 1 sec) and a java ldap browser (connect in less than 2 sec).
 [2002-10-01 20:46 UTC]
Please try using this CVS snapshot:
For Windows:

 [2002-10-08 11:04 UTC] martin at kouba dot at
yes it works with the 4.4.0-dev version
 [2002-10-08 11:05 UTC] martin at kouba dot at
response time is now <= 1 sec.
 [2002-10-08 11:50 UTC]
Closing this then. Thanks for testing.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Apr 01 07:03:36 2023 UTC