ID: 38882 Updated by: [EMAIL PROTECTED] Reported By: d dot wynne at ljmu dot ac dot uk -Status: Open +Status: Closed Bug Type: LDAP related Operating System: SuSE 10.1 x86_64 PHP Version: 4.4.4 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. >would running configure "destroy" the ldap fix No, you can destroy it only by reverting the patch and running ./buildconf again. Previous Comments: ------------------------------------------------------------------------ [2006-10-09 12:12:45] d dot wynne at ljmu dot ac dot uk That worked a charm, I had to do: ./buildconf --force if, at some later stage I want to re-build PHP --with-gd=/usr for example, would running configure "destroy" the ldap fix ? if so, how can I re-instate it. Many many thanks for your help. ------------------------------------------------------------------------ [2006-10-04 15:13:37] [EMAIL PROTECTED] Apply this patch, run make clean && ./buildconf && ./config.nice && make Index: ext/ldap/config.m4 =================================================================== RCS file: /repository/php-src/ext/ldap/config.m4,v retrieving revision 1.26.2.8.2.1 diff -u -p -d -r1.26.2.8.2.1 config.m4 --- ext/ldap/config.m4 3 Nov 2005 20:41:56 -0000 1.26.2.8.2.1 +++ ext/ldap/config.m4 4 Oct 2006 15:12:48 -0000 @@ -23,7 +23,7 @@ PHP_ARG_WITH(ldap,for LDAP support, if test "$PHP_LDAP" != "no"; then - PHP_NEW_EXTENSION(ldap, ldap.c, $ext_shared) + PHP_NEW_EXTENSION(ldap, ldap.c, $ext_shared,,-DLDAP_DEPRECATED=1) if test "$PHP_LDAP" = "yes"; then for i in /usr/local /usr; do ------------------------------------------------------------------------ [2006-10-04 14:49:23] d dot wynne at ljmu dot ac dot uk Sticking with: openldap2-2.3.19 php 4.4.4 Certainly the introduction of ldap:// in front of the hostname stopped the Segmentatio fault on the ldap_connect. The script still Segmentation faulted later on as there are lots of ldap_* functions. I also was unsure of where to put: -DLDAP_DEPRECATED=1 In php 4.4.4 there is no Makefile in ext/ldap, so in config.m4: CPPFLAGS="$CPPFLAGS -I$LDAP_INCDIR" changed to: CPPFLAGS="$CPPFLAGS -I$LDAP_INCDIR -DLDAP_DEPRECATED=1" Still Segfaults, but looking at the output of make the -DLDAP_DEPRECATED=1 didn't seem to be getting passed. Instead changed the "top-level" Makefile, there are 3 "libtool" lines, and changed -DLDAP_DEPRECATED to -DLDAP_DEPRECATED=1 $(LIBTOOL) --mode=compile $(CC) -D_FORTIFY_SOURCE=2 -DLDAP_DEPRECATED=1 -I/usr/include/apache2-prefork -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include -I/usr/include/apr-1 -Isapi/apache2handler/ -I/home/cmstechs/cmsdwynn/SuSE/php-4.4.4/sapi/apache2handler/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/cmstechs/cmsdwynn/SuSE/php-4.4.4/sapi/apache2handler/sapi_apache2.c -o sapi/apache2handler/sapi_apache2.lo sapi/apache2handler/apache_config.lo: /home/cmstechs/cmsdwynn/SuSE/php-4.4.4/sapi/apache2handler/apache_config.c $(LIBTOOL) --mode=compile $(CC) -D_FORTIFY_SOURCE=2 -DLDAP_DEPRECATED=1 ..... Again still segfaults. ------------------------------------------------------------------------ [2006-10-02 22:11:57] [EMAIL PROTECTED] See also bug #38819 and the solution inside. Let us know if it works for you. ------------------------------------------------------------------------ [2006-09-29 15:04:24] d dot wynne at ljmu dot ac dot uk OK, Built & installed. Presumably now there's some new options or statements to the /usr/bin/php CLI script with the ldap_connect statement. ------------------------------------------------------------------------ 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 http://bugs.php.net/38882 -- Edit this bug report at http://bugs.php.net/?id=38882&edit=1