|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-20 09:52 UTC] sas at cvs dot php dot net
[1999-12-13 16:06 UTC] joey at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 15:00:02 2026 UTC |
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