php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26512 ldap_modify, ldap_add, ldap_mod_replace all hang with large arrays
Submitted: 2003-12-03 14:35 UTC Modified: 2003-12-09 06:12 UTC
From: peterjh at mennonot dot net Assigned:
Status: Not a bug Package: LDAP related
PHP Version: 4.3.2 OS: Linux Redhat
Private report: No CVE-ID: None
 [2003-12-03 14:35 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-04 03:25 UTC] petrjh at mennonot dot net
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
 [2003-12-09 06:12 UTC] sniper@php.net
There is a memory_limit and there is also stack limit.
Neither of these are bugs.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 15:01:31 2024 UTC