Hello
I am trying to get a script, see below, to ouput an image from our LDAP.
I am using the script below. However it returns the errors
Warning: ldap_get_values_len(): Cannot get the value(s) of attribute Decoding error in c:\apache\apache\htdocs\mtldapadmin\listldapusers5.php on line 22
Warning: Cannot modify header information - headers already sent by (output started at c:\apache\apache\htdocs\mtldapadmin\listldapusers5.php:22) in c:\apache\apache\htdocs\mtldapadmin\listldapusers5.php on line 23
Anyone know what? Feedback appreciated!!
Thanks
J
$host="xxxxx";
$db="xxxx";
$ds=ldap_connect($host);
$r=ldap_bind($ds);
$sr=ldap_read($ds, $dn, "objectClass=*", array("jpegphoto"));
if ($sr) {
$ei=ldap_first_entry($ds, $sr);
if ($ei) {
$info = ldap_get_values_len($ds, $ei, array("jpegphoto"));
header("Content-type: image/jpeg");
}
echo $info[0];
}
ldap_unbind($ds);
?>