#37767 [NEW]: ldap_bind fails with Out of memory error over apache
| From: | peter dot buki at vodafone dot hu | Date: | Fri, 09 Jun 2006 15:42:10 +0000 |
| Subject: | #37767 [NEW]: ldap_bind fails with Out of memory error over apache | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-98244@lists.php.net to get a copy of this message | ||
From: peter dot buki at vodafone dot hu
Operating system: Solaris 10
PHP version: 5.1.4
PHP Bug Type: LDAP related
Bug description: ldap_bind fails with Out of memory error over apache
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 bug report at http://bugs.php.net/?id=37767&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37767&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37767&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37767&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37767&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37767&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37767&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37767&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37767&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37767&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37767&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37767&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37767&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37767&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37767&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37767&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37767&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37767&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37767&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37767&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37767&r=mysqlcfg