Edit report at https://bugs.php.net/bug.php?id=61853&edit=1

 ID:                 61853
 Updated by:         a...@php.net
 Reported by:        etienne at lamaisondebarbie dot ch
 Summary:            Use of non-deprecated functions
 Status:             Assigned
 Type:               Feature/Change Request
 Package:            LDAP related
 Operating System:   Debian testing
 PHP Version:        master-Git-2012-04-25 (Git)
 Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

Only one thing is crossing my mind is that you could haven't run './buildconf 
--force' after changing the config.* files. If so, that macros was still 
defined.


Previous Comments:
------------------------------------------------------------------------
[2013-02-25 11:48:02] etienne at lamaisondebarbie dot ch

Ok, I'm working on it, but how did you get those warnings, cause I didn't get 
any ?

------------------------------------------------------------------------
[2013-02-25 10:06:17] a...@php.net

Hi,

i've tested your patch on windows and linux, it looks good. However there are 
some warnings now (after LDAP_DEPRECATED removal in the config.* files):

ldap.c: In function ‘_close_ldap_link’:
ldap.c:98: warning: implicit declaration of function ‘ldap_unbind_s’
ldap.c: In function ‘_php_ber_to_array_recursive’:
ldap.c:137: warning: unused variable ‘root’
ldap.c: In function ‘_php_ber_from_array_recursive’:
ldap.c:366: warning: unused variable ‘i’
ldap.c: In function ‘zif_ldap_connect’:
ldap.c:763: warning: implicit declaration of function ‘ldap_init’
ldap.c:763: warning: assignment makes pointer from integer without a cast
ldap.c: In function ‘zif_ldap_bind’:
ldap.c:826: warning: implicit declaration of function ‘ldap_bind_s’
ldap.c: In function ‘php_ldap_do_search’:
ldap.c:1034: warning: unused variable ‘old_ldap_sizelimit’
ldap.c: In function ‘zif_ldap_explode_dn’:
ldap.c:1748: warning: implicit declaration of function ‘ldap_value_free’
ldap.c: In function ‘zif_ldap_delete’:
ldap.c:1981: warning: implicit declaration of function ‘ldap_delete_s’
ldap.c: In function ‘zif_ldap_compare’:
ldap.c:2057: warning: implicit declaration of function ‘ldap_compare_s’
ldap.c: In function ‘zif_ldap_sort’:
ldap.c:2095: warning: implicit declaration of function ‘ldap_sort_entries’

That "implicit declaration" stuff is for sure because of the removed 
LDAP_DEPRECATED definition. Fixing that were now the finishing straight i'd 
say. 
Thanks for you work :)

------------------------------------------------------------------------
[2013-02-24 16:57:22] etienne at lamaisondebarbie dot ch

Here is the patch including patch from #61853 and #61921 with some helper 
functions in file ldap_dev_utils.c. This goes against current php-src head.

------------------------------------------------------------------------
[2013-02-22 21:19:10] etienne at lamaisondebarbie dot ch

Yes you are right, ldap_control_create is not available everywhere (not in 
older libldap and not in winldap). I used it naturally and forget to check for 
this one.
It has to be re-implemented into php-ldap, I'll do as soon as possible.

------------------------------------------------------------------------
[2013-02-22 17:39:35] a...@php.net

Yes, the code from both patches (#61921 and this one) compiles fine, but there 
is a link error with 2.3.42 (not 2.3.48, my bad), it can't find 
ldap_control_create. The latest, 2.4.33, compiles good and tests pass. Only one 
test fails for me ext\ldap\tests\ldap_sasl_bind_basic.phpt , but that's 
disregarding of with or without patch. That's may be because of the server 
configuration. If you mean no new test need to be added, so be.

About that #ifdef - it's not about server but client libs. IMHO, there are 
still enough "stable" distro versions in use, like centos5 and so on, which 
have older openldap by default. At the end of the day, it's not a big deal to 
put just a bit more appropriate checks and be compatible with older client 
libs. As it's almost done now anyway :) It's just a bit confusing both 2.3 and 
2.4 series having the api version of 3001, but from the other side - this way 
the devs mean it stands not very far from each other.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=61853


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61853&edit=1

Reply via email to