|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69471 php-ldap is using deprecated ldap functions
Submitted: 2015-04-16 17:04 UTC Modified: 2017-01-10 07:54 UTC
From: come dot bernigaud at opensides dot be Assigned: mcmic (profile)
Status: Closed Package: LDAP related
PHP Version: 5.6.8RC1 OS:
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: come dot bernigaud at opensides dot be
New email:
PHP Version: OS:


 [2015-04-16 17:04 UTC] come dot bernigaud at opensides dot be
PHP-LDAP is using several deprecated ldap functions from openldap, the attached patch replace these calls by calls the new functions.
I did not remove the -DLDAP_DEPRECATED=1 because there are still some use of deprecated functions after the patch.
This patch is derivated from , but I removed the parts which are not surrounded by #ifdef LDAP_API_FEATURE_X_OPENLDAP to be safe.


replaced-calls-to-deprecated-openldap-functions (last revision 2015-04-16 17:06 UTC by come dot bernigaud at laposte dot net)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-10 10:29 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mcmic
 [2015-06-17 13:54 UTC]
This first patch has been pushed.
All obsolete functions should be removed so that we can remove the -DLDAP_DEPRECATED=1 option
 [2015-10-29 11:31 UTC] blizzz at owncloud dot com
Is this related to ?

It turns out that some usages of ldap_connect now fail to work (e.g.,, Is this as intended?
 [2015-11-03 04:10 UTC]
It definitely seems related, this was not intended.
What I don’t get is that there is a test for this:
And at the time it was passing. I’m gonna build last git and try to see if it passes.
 [2015-11-03 04:56 UTC]
Ok, some of the bug report you mentioned were misleading, what is broken is using host:port, using a full ldap URI like ldap://host:port works as expected.

I’m gonna ask on the ML but this does not seem like a big regression to me as the use of host:port was not tested by the tests and not authorized by the documentation. (But it does seem to break existing code, so I’m not sure)
 [2015-11-03 11:19 UTC] blizzz at owncloud dot com
Thank you for responding. Meanwhile I also investigated more in our (ownCloud) case and found it was a bug with us that on one place we just added the port to the host without verifying whether a URL was given. I apologize for not posting here after fixing this. From what I can tell, it indeed looks good and the patch is fine, our usage was not. Sorry for troubling you.
 [2017-01-10 07:54 UTC]
-Status: Assigned +Status: Closed
 [2017-01-10 07:54 UTC]
From what i've seen this issue is solved in the current releases of PHP.

So I'm closing it.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 00:01:33 2024 UTC