3
votes

The problem is:

ldap_set_rebind_proc() function does not work in any PHP Windows distribution

error obtained when executing the php file: Undefined function ldap_set_rebind_proc()

PHP tested versions (5.* y 7.*), I've even tried it on PHP versions included in WAMP and XAMPP server.

The other LDAP PHP functions , like ldap_connect(), ldap_bind(), etc. works well.

ldap_set_rebind_proc() function works well on PHP Linux distributions.

Any idea of this bug? Any solution to read referrals responses of ldap_search() function without using ldap_set_rebind_proc()?

1
Hello, did you manage to solve this issue on Windows server? I got the same one, may be you have found some good ideas on this case? Thank you - Masha

1 Answers

2
votes

You'll need to compile PHP against a current version of OpenLDAP, though TBH I'm not sure how easy that is on Windows.

Looking at the code, you will see the function is only defined if:

#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)

These are both quite old features (like, turn of the century), but perhaps the prebuilt binaries are not compiled against modern versions.