Bug #12231 Updated: about ldap_get_values_len

From: Date: Mon, 12 Nov 2001 14:19:13 +0000
Subject: Bug #12231 Updated: about ldap_get_values_len
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-70240@lists.php.net to get a copy of this message
ID: 12231 Updated by: venaas Reported By: stsit@szonline.net Old Status: Open Status: Feedback Bug Type: LDAP related Operating System: redhat7.0 PHP Version: 4.0.6 New Comment: This is precisely why ldap_get_values_len() exists. I use the following code to extract pictures: ds=ldap_connect($host); $r=ldap_bind($ds); $sr=ldap_read($ds, $dn, "objectClass=*", array("jpegphoto")); if ($sr) { $ei=ldap_first_entry($ds, $sr); if ($ei) { $info = ldap_get_values_len($ds, $ei, "jpegphoto"); header("Content-type: image/jpeg"); } echo $info[0]; } ldap_unbind($ds); If this doesn't work, show me your exact script and if possible give me host, port and dn for your server so I can try. If you want to try against my server, try for instance ldap.uninett.no with the DN cn=Anders Lund,o=DUNINETT,dc=Duninett,dc=no Previous Comments: ------------------------------------------------------------------------ [2001-07-18 09:53:25] stsit@szonline.net I have a binary data in LDAP,(the data is 570k) when i use $data=ldap_get_values_len() to get the data, i found that $data[0] has 33k,i think because it have "00" in the binary data. how can i do? ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12231&edit=1

« previous php.dev (#70240) next »