php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16862 Can't compile PHP with LDAP: ldap_start_tls_s don't found
Submitted: 2002-04-26 15:37 UTC Modified: 2002-06-22 07:59 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:2 (50.0%)
From: h dot molina at ieee dot org Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.2.0 OS: Solaris 8.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: h dot molina at ieee dot org
New email:
PHP Version: OS:

 

 [2002-04-26 15:37 UTC] h dot molina at ieee dot org
When try to compile the PHP under Solaris 8 with NS-LDAP API 4.1 or native ldap, generate the follow error:

Undefined			first referenced
 symbol  			    in file
ldap_start_tls_s                    ./.libs/libphp4.a(ldap.o)
ld: fatal: Symbol referencing errors. No output written to php
collect2: ld returned 1 exit status

Using SUN native C compiler (SUNWspro rel 5.0) and gcc 3.0.4

The configure line is:
 './configure' '--prefix=/usr/opt/php' '--enable-shared' '--with-openssl' '--with-ibm-db2=/SOMEWHERE/IBMdb2/V6.1' '--enable-sysvsem' '--enable-sysvshm' '--with-java=/usr/j2se' '--enable-ftp' '--with-mysql=/SOMEWHERE/mysql' '--with-pgsql=/SOMEWHERE/pgsql' '--with-config-file-path=/usr/opt/php/etc' '--with-pdflib' '--with-jpeg-dir=/SOMEWHERE' '--with-png-dir' '--with-tiff-dir' '--with-xpm-dir' '--with-gd' '--with-zlib-dir=/usr/lib' '--enable-shmop' '--enable-sigchild' '--enable-safe-mode' '--with-exec-dir=/usr/opt/php/bin' '--with-tsrm-pthreads' '--with-mhash=/SOMEWHERE' '--enable-memory-limit' '--with-ldap=/SOMEWHERE'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-06 18:49 UTC] barryn at baptisthealth dot net
I had the same problem using gcc.
PHP 4.2 seems to include code for start_tls when it sees an ldap version >2000, however, solaris ldap version (defined in /usr/include/ldap.h) is 2004, yet it does not support this function. I changed line 441 in ldap.c to read
#if LDAP_API_VERSION >= 2000
lines 528, 537, 546
#if ( LDAP_API_VERSION >= 2000 ) || HAVE_NSLDAP
and set the LDAP_API_VERSION in /usr/include/ldap.h to 2000
this seemed to compile ok and ran with no error.
Looks like we need some more #ifdef statements.
 [2002-05-06 18:49 UTC] barryn at baptisthealth dot net
I had the same problem using gcc.
PHP 4.2 seems to include code for start_tls when it sees an ldap version >2000, however, solaris ldap version (defined in /usr/include/ldap.h) is 2004, yet it does not support this function. I changed line 441 in ldap.c to read
#if LDAP_API_VERSION >= 2000
lines 528, 537, 546
#if ( LDAP_API_VERSION >= 2000 ) || HAVE_NSLDAP
and set the LDAP_API_VERSION in /usr/include/ldap.h to 2000
this seemed to compile ok and ran with no error.
Looks like we need some more #ifdef statements.
 [2002-05-22 20:27 UTC] fowler at csufresno dot edu
I removed references to 'ldap_start_tls_s' in ldap.c and I was able to build the ldap module and get it working with the web server.
 [2002-05-23 09:23 UTC] sniper@php.net
reclassified
 [2002-06-22 07:59 UTC] venaas@php.net
Fixed in CVS. Added test for ldap_start_tls_s().

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC