#26512 [Com]: ldap_modify, ldap_add, ldap_mod_replace all hang with large arrays

From: Date: Thu, 04 Dec 2003 08:25:15 +0000
Subject: #26512 [Com]: ldap_modify, ldap_add, ldap_mod_replace all hang with large arrays
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-51673@lists.php.net to get a copy of this message
 ID:               26512
 Comment by:       petrjh at mennonot dot net
 Reported By:      peterjh at mennonot dot net
 Status:           Feedback
 Bug Type:         LDAP related
 Operating System: Linux Redhat
 PHP Version:      4.3.2
 New Comment:

Did upgrade to said version, with a slightly larger degree of success
(32k, for example, consistently worked), but 35k and above continues to
never work.  Here's a snippet of code which I use to test:
http://www.mennonot.net/~peterjh/test.php


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

[2003-12-04 02:02:40] sniper@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2003-12-03 14:35:41] peterjh at mennonot dot net

Description:
------------
ldap_modify, ldap_add, and ldap_mod_replace all hang when they attempt
to adjust an individual attribute with data roughly 31k characters or
greater.  There is a threshold such that 30k and below works fine and
35k and above never works.  Example:

$attrs = array();
$attrs['mnappparam'][0] = "tmpalkkllk...";
# strlen($attrs['mnappparam'][0]) is 32000
ldap_mod_replace($conn, $dn, $attrs);
# we hang, but if $attrs['mnappparam'][0] is 31000 or less, # we work.

It should be noted that cut-n-pasting (and modifying a little) and then
attempting to use ldap_modify (commandline), the entry works, no matter
how large.  (Thus, definately a PHP bug.)  






Reproduce code:
---------------
$attrs = array();
$attrs['mnappparam'][0] = "tmpalkkllk...";
# strlen($attrs['mnappparam'][0]) is 32000
ldap_mod_replace($conn, $dn, $attrs);
# we hang, but if $attrs['mnappparam'][0] is 31000 or less, 
# we work.



Expected result:
----------------
It just hangs.



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


-- 
Edit this bug report at http://bugs.php.net/?id=26512&edit=1


Thread (4 messages)

« previous php.bugs (#51673) next »