php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8583 Apache won't compile php module with ldap support
Submitted: 2001-01-07 20:21 UTC Modified: 2001-01-08 07:54 UTC
From: jimmydigital at hotmail dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.4 OS: Redhat 6.2
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: jimmydigital at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-01-07 20:21 UTC] jimmydigital at hotmail dot com
My config line is (seperated here for readability)

./configure --with-apache=../apache_1.3.14 
            --with-gd=/usr/local/src/gd-1.8.3/ 
            --with-mysql 
            --with-openssl=/usr/local/src/openssl-0.9.6 
            --with-imap=/usr/local/src/imap-2000a 
            --with-ldap=/usr/local/src/openldap-1.2.11 
            --enable-track-vars

Php will compile without error... but when I try to compile apache it bombs with messages about undefined refrences to ldap function calls...  The following is the last compile message before it starts giving errors... I note that the ldap path info is missing... this line is also broken for clarity. 


gcc  -DLINUX=2 -I/usr/local/src/php-4.0.4
-I/usr/local/src/php-4.0.4/main -I/usr/local/src/php-4.0.4/main
-I/usr/local/src/php-4.0.4/Zend -I/usr/local/src/php-4.0.4/Zend -I/usr/local/src/php-4.0.4/TSRM
-I/usr/local/src/php-4.0.4/TSRM -I/usr/local/src/php-4.0.4 -DUSE_EXPAT
-I./lib/expat-lite -DNO_DL_NEEDED `./apaci`    \
-o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php4/libphp4.a main/libmain.a
./os/unix/libos.a ap/libap.a  lib/expat-lite/libexpat.a
-Wl,-rpath,/usr/local/src/openssl-0.9.6/lib
-Wl,-rpath,/usr/local/src/gd-1.8.3/
-Wl,-rpath,/usr/local/src/imap-2000a/c-client  -rdynamic
-L/usr/local/src/openssl-0.9.6/lib
-L/usr/local/src/gd-1.8.3/
-L/usr/local/src/imap-2000a/c-client
-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4
-lpam -lc-client  -ldl -lpng -lz -lgd -lcrypto -lssl -lresolv -lm -ldl -lcrypt -lnsl  -lresolv   -lm -lcrypt


It works fine without ldap... any ideas on what I'm missing here?   Ldap is installed and working as are the other components involved here... 

Thanks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-07 21:27 UTC] rasmus@php.net
The exact compiler error would help here
 [2001-01-07 22:40 UTC] jimmydigital at hotmail dot com
The exact compiler messages are: 

modules/php4/libphp4.a(ldap.o): In function `_close_ldap_link':
/usr/local/src/php-4.0.4/ext/ldap/ldap.c:126: undefined reference to `ldap_unbind_s'
modules/php4/libphp4.a(ldap.o): In function `_free_ldap_result':
/usr/local/src/php-4.0.4/ext/ldap/ldap.c:135: undefined reference to `ldap_msgfree'
modules/php4/libphp4.a(ldap.o): In function `php_if_ldap_connect':
/usr/local/src/php-4.0.4/ext/ldap/ldap.c:374: undefined reference to `ldap_open'


and on for all the ldap functions... ending with:

modules/php4/libphp4.a(ldap.o): In function `php_if_ldap_err2str':
/usr/local/src/php-4.0.4/ext/ldap/ldap.c:1444: undefined reference to `ldap_err2string'
modules/php4/libphp4.a(ldap.o): In function `php_if_ldap_error':
/usr/local/src/php-4.0.4/ext/ldap/ldap.c:1467: undefined reference to `ldap_err2string'
modules/php4/libphp4.a(ldap.o): In function `php_if_ldap_compare':
/usr/local/src/php-4.0.4/ext/ldap/ldap.c:1495: undefined reference to `ldap_compare_s'
/usr/local/src/php-4.0.4/ext/ldap/ldap.c:1507: undefined reference to `ldap_err2string'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.14/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/src/apache_1.3.14'
make: *** [build] Error 2
 [2001-01-08 07:54 UTC] sniper@php.net
You should be using the INSTALL dirs for --with-xxxx
options, except --with-apache, of course.

ie. if LDAP libs are installed with prefix /opt/ldap
then the correct option is:

--with-ldap=/opt/ldap


Reopen this bug report if problem still exists when
using correct paths. And remember to delete config.cache
before re configure! And after configure do 'make clean'.

--Jani


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 15:00:02 2026 UTC