|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-08-21 20:14 UTC] rocko823 at gmail dot com
Description:
------------
PHP 5.2.6 with Apache 2.2.9 with this configure: './configure' '--with-apxs2=/web/apache/bin/apxs' '--with-mysql=/local/mysql32' '--with-gd' '--with-jpeg-dir=/usr/local/' '--with-zlib' '--with-oci8=instantclient,/local/instantclient_10_2' '--with-mcrypt' '--with-ldap' '--with-ldap-sasl' '--with-openssl=/usr/local/ssl'
with openldap 2.3.39
When ldap_connect then ldap_bind is run it fails with ldap error "Out of memory" only when run under Apache 2 module, with the command line client it runs correctly.
Reproduce code:
---------------
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
$ds=ldap_connect("ldap://server");
if ($ds) {
$r=@ldap_bind($ds, "user", "password");
if ($r) {
echo "success";
} else {
echo "fail:" . ldap_error($ds);
}
}
Expected result:
----------------
PHP connects and binds to the LDAP server and returns success
Actual result:
--------------
PHP returns ldap error "Out of memory". PHP doesn't even try to connect to the LDAP server. In the apache error logs I see these ldap debugging messages:
ldap_create
ldap_url_parse_ext(ldap://server)
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
and it stops there where when run with the command line and a success there are many more lines
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 14:00:01 2025 UTC |
output from ldd libphp5.so librt.so.1 => /usr/lib/librt.so.1 libmysqlclient.so.15 => /local/mysql32/lib/libmysqlclient.so.15 libmcrypt.so.4 => /local/lib/libmcrypt.so.4 libltdl.so.3 => /local/lib/libltdl.so.3 libldap-2.3.so.0 => /local/lib/libldap-2.3.so.0 libpng12.so.0 => /usr/lib/libpng12.so.0 libssl.so.0.9.8 => /usr/local/ssl/lib/libssl.so.0.9.8 libcrypto.so.0.9.8 => /usr/local/ssl/lib/libcrypto.so.0.9.8 libresolv.so.2 => /usr/lib/libresolv.so.2 libm.so.2 => /usr/lib/libm.so.2 libnsl.so.1 => /usr/lib/libnsl.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libxml2.so.2 => /usr/lib/libxml2.so.2 libclntsh.so.10.1 => /local/instantclient_10_2/libclntsh.so.10.1 libc.so.1 => /usr/lib/libc.so.1 libgcc_s.so.1 => /usr/sfw/lib/libgcc_s.so.1 libaio.so.1 => /usr/lib/libaio.so.1 libmd.so.1 => /usr/lib/libmd.so.1 libpthread.so.1 => /usr/lib/libpthread.so.1 libthread.so.1 => /usr/lib/libthread.so.1 libgen.so.1 => /usr/lib/libgen.so.1 libm.so.1 => /usr/lib/libm.so.1 libdl.so.1 => /usr/lib/libdl.so.1 liblber-2.3.so.0 => /local/lib/liblber-2.3.so.0 libsasl2.so.2 => /local/lib/libsasl2.so.2 libucb.so.1 => /usr/ucblib/libucb.so.1 libelf.so.1 => /usr/lib/libelf.so.1 libz.so.1 => /usr/lib/libz.so.1 libmp.so.2 => /usr/lib/libmp.so.2 libscf.so.1 => /usr/lib/libscf.so.1 libnnz10.so => /local/lib/libnnz10.so libkstat.so.1 => /usr/lib/libkstat.so.1 libsched.so.1 => /usr/lib/libsched.so.1 libdoor.so.1 => /usr/lib/libdoor.so.1 libuutil.so.1 => /usr/lib/libuutil.so.1 /platform/SUNW,Sun-Fire-480R/lib/libc_psr.so.1 /platform/SUNW,Sun-Fire-480R/lib/libmd_psr.so.1 I checked the apache ldap modules and they are linking against the same versions of the ldap libs as reported above for libphp5.so