#45886 [Opn->Fbk]: ldap_bind fails with out of memory

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               45886
 Updated by:       [email protected]
 Reported By:      rocko823 at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         LDAP related
 Operating System: Solaris 10 SPARC
 PHP Version:      5.2.6
 New Comment:

Try disabling oci8. And check also that Apache is linked with same
Openssl libs as you're linking PHP with.


Previous Comments:
------------------------------------------------------------------------

[2008-08-21 20:14:11] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45886&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.