Re: (More Information) was Problems with ldap_modify() and very large entries

From: Date: Tue, 02 Dec 2003 14:56:57 +0000
Subject: Re: (More Information) was Problems with ldap_modify() and very large entries
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171583@lists.php.net to get a copy of this message
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

« previous php.general (#171583) next »