php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5197 Can't connect ldap server
Submitted: 2000-06-23 05:43 UTC Modified: 2000-06-30 07:45 UTC
From: xiangxb at itc dot com dot cn Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.0 Release Candidate 2 OS: Red Hat Linux 6.1
Private report: No CVE-ID: None
 [2000-06-23 05:43 UTC] xiangxb at itc dot com dot cn
I use openldap version 1.2.8 as client in my system. 
$ds=ldap_connect("202.106.185.51"), but $ds return NULL.
I test using openldap C function, it works good 
as ldap_open ("202.106.185.51", 389). $ds=ldap_connect("202.106.185.51") also works good in php3. 

my configure file is:
/configure --disable-debug --with-apache=../apache_1.3.12 --with-config-file-path=/usr/local/apache/conf --with-oci8=/oracle/u01/app/oracle/product/8.1.5 --with-ldap=/usr/local/openldap

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-30 07:44 UTC] xiangxb at itc dot com dot cn
I solve this problem.  This need php4 changes configure to put -lldap -llber before -lclntsh.
I change apache_1.3.12/src/Makefile and apache_1.3.12/src/modules/php4/Makefile that put -lldap -llber before -lclntsh in LIBS1
of apache_1.3.12/src/Makefile and apache_1.3.12/src/modules/php4/Makefile. It works

It's that LIBS1=  -Wl,-rpath,/usr/local/openldap/lib -Wl,-rpath,/usr/local/oracle/u01/app/oracle/product/8.1.5/lib  -rdynamic -L/usr/local/openldap/lib -L/usr/local/oracle/u01/app/oracle/product/8.1.5/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4  -lgdbm -lpam  -ldl -lldap -llber -lclntsh -lpthread -lm 
-lgd -lresolv -lm -ldl -lcrypt -lnsl  -lresolv -lm -lcrypt


 [2000-06-30 07:45 UTC] xiangxb at itc dot com dot cn
I solve this problem.  This need php4 changes configure to put -lldap -llber before -lclntsh.
I change apache_1.3.12/src/Makefile and apache_1.3.12/src/modules/php4/Makefile that put -lldap -llber before -lclntsh in LIBS1
of apache_1.3.12/src/Makefile and apache_1.3.12/src/modules/php4/Makefile. It works

It's that LIBS1=  -Wl,-rpath,/usr/local/openldap/lib -Wl,-rpath,/usr/local/oracle/u01/app/oracle/product/8.1.5/lib  -rdynamic -L/usr/local/openldap/lib -L/usr/local/oracle/u01/app/oracle/product/8.1.5/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4  -lgdbm -lpam  -ldl -lldap -llber -lclntsh -lpthread -lm 
-lgd -lresolv -lm -ldl -lcrypt -lnsl  -lresolv -lm -lcrypt


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC