php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18058 ldap_start_tls_s does not exist in Netscape SDK
Submitted: 2002-06-29 05:15 UTC Modified: 2002-06-29 05:41 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: rmeans at law dot berkeley dot edu Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.1 OS: Solaris 8
Private report: No CVE-ID: None
 [2002-06-29 05:15 UTC] rmeans at law dot berkeley dot edu
Using Netscape LDAP SDK 4 with PHP 4.2.1, Apache will not link because of an undefined reference to ldap_start_tls_s in ldap.o.

modules/php4/libphp4.a(ldap.o): In function `zif_ldap_start_tls':
/usr/local/src/php-4.2.1/ext/ldap/ldap.c:2009: undefined reference to `ldap_start_tls_s'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1

The Netscape SDK does not include this function and PHP doesn't seem to know that I'm not using OpenLDAP. Does PHP only work with the OpenLDAP libraries?

Thanks!




Configure line:

CC=gcc ./configure --with-oci8 --without-mysql --with-ldap=/usr/local/ldapsdk \
--with-apache=../apache_1.3.26 --enable-track-vars --enable-sigchild \
--with-gd --with-png-dir=/usr/local/lib --with-zlib-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib \
--enable-inline-optimization

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-29 05:37 UTC] rmeans at law dot berkeley dot edu
The following patches to ldap.c and php_ldap.h resolve the problem:

*** ldap.c      Sat Jun 29 02:24:23 2002
--- ldap.c.orig Sat Jun 29 02:21:36 2002
***************
*** 119,123 ****
  #endif
  
! #if defined(LDAP_API_FEATURE_X_OPENLDAP) && ( LDAP_API_VERSION > 2000 )
        PHP_FE(ldap_start_tls,                                                          NULL)
  #endif
--- 119,123 ----
  #endif
  
! #if LDAP_API_VERSION > 2000
        PHP_FE(ldap_start_tls,                                                          NULL)
  #endif
***************
*** 1993,1997 ****
  #endif
  
! #if defined(LDAP_API_FEATURE_X_OPENLDAP) &&  ( LDAP_API_VERSION > 2000 )
  /* {{{ proto bool ldap_start_tls(resource link)
     Start TLS */
--- 1993,1997 ----
  #endif
  
! #if LDAP_API_VERSION > 2000
  /* {{{ proto bool ldap_start_tls(resource link)
     Start TLS */


*** php_ldap.h  Sat Jun 29 02:23:49 2002
--- php_ldap.h.orig     Sat Jun 29 02:23:29 2002
***************
*** 90,94 ****
  #endif
  
! #if defined(LDAP_API_FEATURE_X_OPENLDAP) && ( LDAP_API_VERSION > 2000 )
  PHP_FUNCTION(ldap_start_tls);
  #endif
--- 90,94 ----
  #endif
  
! #if LDAP_API_VERSION > 2000
  PHP_FUNCTION(ldap_start_tls);
  #endif
 [2002-06-29 05:41 UTC] derick@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

(You need the non-stable snapshot).

Derick
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 28 00:03:34 2022 UTC