php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37767 ldap_bind fails with Out of memory error over apache
Submitted: 2006-06-09 15:42 UTC Modified: 2006-06-22 01:00 UTC
From: peter dot buki at vodafone dot hu Assigned:
Status: No Feedback Package: LDAP related
PHP Version: 5.1.4 OS: Solaris 10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-06-09 15:42 UTC] peter dot buki at vodafone dot hu
Description:
------------
Using php-5.1.4 with mysql-5.0.22 (libs only), apache-2.2.2 (tried 2.0.55 also) and openldap-2.3.24 (tried 2.3.21 also).

When invoking the script with command line, it runs fine, but when using the mod_php (with a browser over apache) it fails with "Out of memory" error number -10.

Reproduce code:
---------------
<?php
ini_set("memory_limit","256M") or die("Could not set memory_limit") ;

echo "<h3>LDAP query test</h3>";
echo "Connecting ...";
$ds=ldap_connect("172.16.2.8") or die('Could not connect.') ;;  // must be a valid LDAP server!

if ($ds) {
   echo "Binding ...";
   $r=ldap_bind($ds,'DC=whatever,DC=hu','')
   or die(ldap_errno($ds) . " : " . ldap_error($ds)) ;

   echo "Bind result is " . $r . "<br />";

}
?>


Expected result:
----------------
Over browser something like:
<h3>LDAP query test</h3>Connecting ...Binding ...Bind result is 1<br />

Over command line:
<h3>LDAP query test</h3>Connecting ...Binding ...Bind result is 1<br />

Actual result:
--------------
Over browser:
<h3>LDAP query test</h3>Connecting ...Binding ...<br />
<b>Warning</b>:  ldap_bind() [<a href='function.ldap-bind'>function.ldap-bind</a>]: Unable to bind to server: Out of memory in <b>/var/www/test/index.php</b> on line <b>11</b><br />
-10 : Out of memory

Over command line:
<h3>LDAP query test</h3>Connecting ...Binding ...Bind result is 1<br />

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-14 16:49 UTC] sniper@php.net
Check the openldap logs for this, the error comes from openldap, not PHP.
 [2006-06-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 02:01:23 2020 UTC