[Date Prev][Date Next]
adding jpegphoto in a OpenLDAP server with PHP
I tried to add a jpeg image to the jpegphoto attribute with this code
I tried :
$fd = fopen($pathphoto, "r");
$fsize = filesize ($pathphoto);
$jpegStr = fread ($fd, $fsize);
$attrs['jpegPhoto'] = $jpegStr;
When I see with LDAPBrowser there is a jpegPhoto attribute filled in
my entry with the message : "Error processing image".
Is anybody as an example with PHP. ?
Is the $jpegStr must be encode ?