|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-06-14 16:49 UTC] sniper@php.net
  [2006-06-22 01:00 UTC] php-bugs at lists dot php dot net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
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 />