Just to note:
the problem holds true for: ldap_mod_add, ldap_modify, and ldap_mod_replace.
 Also, adding ldap_set_option($conn, LDAP_OPT_SIZELIMIT, 200000) doesn't
resolve the problem (or setting it to 0).

Peter

On Tue, 2 Dec 2003, Peter J Hartman wrote:

> Here's a followup to my problem with ldap_mod_replace and ldap_modify.
>  Attached is a simple program demonstrating the problem.  Basically,
> if you try to fill an attribute in ldap that is something around 17000
> characters or above, ldap_mod_replace hangs.  I've determined it
> is definately a PHP problem, since ldap_modify
> from the commandline works consistently and fine with very high amounts of
> data.
> 
> Thus, in the following simple code:
> 
> $conn = ldap_connect("ldap://ldap.server.net";);
> ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
> ldap_start_tls($conn);
> ldap_bind($conn, 'uid=root,ou=users,dc=server,dc=net', 'password');
> $dn = "mnTB=CB1,mnTS=abra,mnT=index,dc=peterjh,dc=in,dc=us,dc=server,dc=net";
> $array = array();
> $output = "";
> for ($i = 0; $i < 170;  $i++)
>     {                          
>     # 26 * 4 = 104 - 4 = 100              
>     # thus append a hundred characters each iteration
>     $string = 
> "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk
>     $output .= $string;
>     }                  
> print strlen($output) ."\n";
> $array['mnappparam'][0] = $output;
> ldap_mod_replace($conn, $dn, $array);
> 
> Setting the top of $i to 170 or above hangs (consistently) ldap_mod_replace.
>  Technically, 161-180 (thus, 17000-18000 characters) hangs inconsistently,
> while 160 and belows never hangs (16000 characters) and 181+ (181000
> chars) hangs everytime.
> 
> Any help on this would be highly appreciated,
> Peter John Hartman
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to