Hello
For whoever is interested, I updated Pierangelo Masarati's patch to support EXOP in PHP LDAP module.
Patches for PHP 5.4, 5.5 and 5.6 can be found here: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/php-ldap/files/
Previous patch for PHP 5.3 and PHP 5.2 is in the Attic.
On 2015-04-13 11:45, Emmanuel Dreyfus wrote:
Hello
For whoever is interested, I updated Pierangelo Masarati's patch to support EXOP in PHP LDAP module.
Patches for PHP 5.4, 5.5 and 5.6 can be found here: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/php-ldap/files/
Previous patch for PHP 5.3 and PHP 5.2 is in the Attic.
After applying your patch on PHP 5.6 I get these errors compiling: In file included from /home/mcmic/dev/php-src/ext/ldap/ldap.c:45:0: /home/mcmic/dev/php-src/ext/ldap/php_ldap.h:32:0: warning: "HAVE_3ARG_SETREBINDPROC" redefined [enabled by default] In file included from /home/mcmic/dev/php-src/TSRM/tsrm_config.h:1:0, from /home/mcmic/dev/php-src/TSRM/tsrm_config_common.h:13, from /home/mcmic/dev/php-src/Zend/zend_virtual_cwd.h:27, from /home/mcmic/dev/php-src/main/php.h:404, from /home/mcmic/dev/php-src/ext/ldap/ldap.c:39: /home/mcmic/dev/php-src/include/../main/php_config.h:373:0: note: this is the location of the previous definition /home/mcmic/dev/php-src/ext/ldap/ldap.c:72:0: warning: "HAVE_LDAP_REFRESH" redefined [enabled by default] In file included from /home/mcmic/dev/php-src/ext/ldap/ldap.c:45:0: /home/mcmic/dev/php-src/ext/ldap/php_ldap.h:48:0: note: this is the location of the previous definition /home/mcmic/dev/php-src/ext/ldap/ldap.c: In function ‘_php_sasl_interact’: /home/mcmic/dev/php-src/ext/ldap/ldap.c:732:2: error: unknown type name ‘sasl_interact_t’ /home/mcmic/dev/php-src/ext/ldap/ldap.c:736:16: error: request for member ‘id’ in something not a structure or union /home/mcmic/dev/php-src/ext/ldap/ldap.c:736:24: error: ‘SASL_CB_LIST_END’ undeclared (first use in this function) /home/mcmic/dev/php-src/ext/ldap/ldap.c:736:24: note: each undeclared identifier is reported only once for each function it appears in /home/mcmic/dev/php-src/ext/ldap/ldap.c:738:18: error: request for member ‘id’ in something not a structure or union /home/mcmic/dev/php-src/ext/ldap/ldap.c:739:9: error: ‘SASL_CB_GETREALM’ undeclared (first use in this function) /home/mcmic/dev/php-src/ext/ldap/ldap.c:742:9: error: ‘SASL_CB_AUTHNAME’ undeclared (first use in this function) /home/mcmic/dev/php-src/ext/ldap/ldap.c:745:9: error: ‘SASL_CB_USER’ undeclared (first use in this function) /home/mcmic/dev/php-src/ext/ldap/ldap.c:748:9: error: ‘SASL_CB_PASS’ undeclared (first use in this function) /home/mcmic/dev/php-src/ext/ldap/ldap.c:753:12: error: request for member ‘result’ in something not a structure or union /home/mcmic/dev/php-src/ext/ldap/ldap.c:754:12: error: request for member ‘len’ in something not a structure or union /home/mcmic/dev/php-src/ext/ldap/ldap.c:754:35: error: request for member ‘result’ in something not a structure or union
It was building fine before applying the patch. Does this patch adds another dependency? Also, it seems in php_ldap.h you have several identical defines: +#define HAVE_LDAP_EXTENDED_OPERATION_S +#define HAVE_LDAP_PASSWD_S +#define HAVE_LDAP_WHOAMI_S +#define HAVE_LDAP_REFRESH +#define HAVE_LDAP_SASL +#define HAVE_LDAP_EXTENDED_OPERATION_S +#define HAVE_LDAP_REFRESH +#define HAVE_LDAP_EXTENDED_OPERATION_S +#define HAVE_LDAP_REFRESH +#define HAVE_LDAP_EXTENDED_OPERATION
Wrong copy/paste maybe?
On 2015-04-15 17:19, Emmanuel Dreyfus wrote:
On Wed, Apr 15, 2015 at 04:43:06PM +0200, Côme BERNIGAUD wrote:
After applying your patch on PHP 5.6 I get these errors compiling:
Which version? I tried on 5.6.7
On PHP-5.6 branch of php git. I just tried on PHP-5.6.7 branch and got the same thing.
This seems to be because I used --with-ldap but not the --with-ldap-sasl configure option. If I use both options it builds fine.
So maybe some ifdef are missing? Or the «#define HAVE_LDAP_SASL» the patch adds in php_ldap.h may be the problem.
Côme BERNIGAUD come.bernigaud@opensides.be wrote:
Or the «#define HAVE_LDAP_SASL» the patch adds in php_ldap.h may be the
problem.
Yes, the defines should be set by the configure script, which means tests should be added there. Otherwise the person that does the build has to comment out the defines depending on its setup.
Côme BERNIGAUD come.bernigaud@opensides.be wrote:
This seems to be because I used --with-ldap but not the --with-ldap-sasl configure option. If I use both options it builds fine.
I updated the patches to address this: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/php-ldap/files/
openldap-technical@openldap.org