ID: 37767
Updated by: [EMAIL PROTECTED]
Reported By: peter dot buki at vodafone dot hu
-Status: Open
+Status: Feedback
Bug Type: LDAP related
Operating System: Solaris 10
PHP Version: 5.1.4
New Comment:
Check the openldap logs for this, the error comes from openldap, not
PHP.
Previous Comments:
------------------------------------------------------------------------
[2006-06-09 15:42:10] 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 />
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37767&edit=1