From: [EMAIL PROTECTED] Operating system: Solaris 8 PHP version: 4.0.4pl1 PHP Bug Type: Feature/Change Request Bug description: need a tweak to ldap_add to set a binary flag [actually the version is 4.0.5-dev but that isn't listed] Adding binary data to an ldap entry isn't possible at present because there is no capability in the [php] ldap code to do it. It would be very nice if some clever person could allow the following syntax to be used attributename;binary . A simple example to encode cr+lf into a string so that clients display the entry over two lines:- $info["postalAddress;binary"] = base64_encode("address line 1\r\naddress line 2\r\n"); The extra ;binary would then signify (as in an ldif file) that the data is to be treated as binary. This syntax seems to be standard. I've also seen postaladdress:: in an ldif file (the double colon signifying binary) but use of that would be less clear/obvious imho. Then a change would be needed to ext/ldap/ldap.c to do the following when the ;binary appears in an attribute name (from the openldap man page on ldap_modify) OpenLDAP 2.0.7-Rel Last change: 22 September 1998 If you need to specify a non-string value (e.g., to add a photo or audio attribute value), you should set mod_op to the logical OR of the operation as above (e.g., LDAP_MOD_REPLACE) and the constant LDAP_MOD_BVALUES. In this case, mod_bvalues should be used instead of mod_values, and it should point to a null-terminated array of struct bervals, as defined in <lber.h>. I'm no great c programmer and would get stuck at the first hurdle, but this would be a great addition for ldap and in the hands of an expert doesn't look like it would take too long to implement. Many thanks once again for... well, everything! Best Regards, Brian -- Edit Bug report at: http://bugs.php.net/?id=10143&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]