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

Re: adding jpegphoto in a OpenLDAP server with PHP



There is nothing OpenLDAP-specific about adding values of
jpegphoto to slapd(8).  Hence, your question is off topic
here.

However, I note that the first thing you should do is determine
whether the problem is with the client writing the value or
the client reading the value.  That is, you should use
ldapadd/ldapsearch to test each clients behavior independently
of the other.  Once you determined which client(s) are not
behaving properly, then (after exhausting any relevant
documentation, archives, etc.) take the issue to an appropriate
forum.  (This list is not appropriate for issues specific to
either of clients you are using.)

Kurt

At 06:27 AM 9/1/2004, pemabontech wrote:

>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
>
>