[Date Prev][Date Next] [Chronological] [Thread] [Top]

adding jpegphoto in a OpenLDAP server with PHP



Hi, 

I tried to add a jpeg image to the jpegphoto attribute with this code

I tried : 

$fd = fopen($pathphoto, "r");
var_dump($fd);
$fsize = filesize ($pathphoto); 
$jpegStr = fread ($fd, $fsize); 
fclose ($fd); 
$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 ?

Thanks