#2046 - PHP ERROR [64] Cannot redeclare ldap_escape() in sources/cns_ldap.php

This is a spacer post for a website comment topic. The content this topic relates to: #2046 - PHP ERROR [64] Cannot redeclare ldap_escape() in sources/cns_ldap.php
Automated response: LDAP not working on PHP 5.6

PHP now defines its own ldap_escape function. This hotfix renames our function to avoid a naming conflict.

Thanks Chris

Seems php 5.6 has a built in function called ldap_escape, which was breaking the client authentication.

My workaround was to rename the function in the code.

All usage is confined to the source file cns_ldap.php. So I made a backup then edited the file and change all instances of:

ldap_escape
to
cns_ldap_escape

That Sorted out the issue and all is working fine.

Thanks for the files will update
That's right, that's exactly what this fix does (except we used cms_ prefix not cns_).
0 guests and 0 members have recently viewed this.