Bug #1429: Unable to retreive jpeg image-data from Directory using LDAP

From: Date: Thu, 20 May 1999 14:33:37 +0000
Subject: Bug #1429: Unable to retreive jpeg image-data from Directory using LDAP
Groups: php.dev 
Request: Send a blank email to php-dev+get-5809@lists.php.net to get a copy of this message
From: kenson@sentor.se Operating system: FreeBSD 4.0-CURRENT PHP version: 3.0.7 PHP Bug Type: Other Bug description: Unable to retreive jpeg image-data from Directory using LDAP I use this little snippet of code to retreive a jpeg image from the directory. (I know all the data goes through to the client side since I traced it) --CODE-- $sr=ldap_read($ds,"$dnpic","jpegphoto=*",array("jpegphoto")); $info = ldap_get_entries($ds, $sr); Header("Content-type: image/jpeg"); echo $info[0]["jpegphoto"][0]; $f = fopen("/tmp/fil.jpg","w"); fwrite($f,$info[0]["jpegphoto"][0]); --CODE-- The file /tmp/fil.jpg will contain all bytes in the image up til the first NULL byte occurence where it is cut off. Using ldap_search() with appropriate params yields the same result. And I have tested to retreive the image using LDAP command-line clients - works fine. My php is --with-apache, --with-mysql, --with-ldap, --with-imap LDAP: RCS Version: $Id: ldap.c,v 1.66 1999/02/01 02:31:10 sas Exp $ Nothing relevant in my php3.ini -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5809) next »