>The problem comes when fields in the html pages are left empty, which is
>normal for this application.  For those familiar with the ldap_add/modify
>functions in PHP, the array that is passed in has some values, say for
>example title, fax, mobile, ... left empty, and therefore NULL (I have
>checked, they really are NULL's stored in the array).  When the values make
>it to the ldap server however, they appear to be no longer NULL's, but a
>"#0", and through debugging output on the ldap server, I have seen it is
>generating an "invalid per syntax" error.

FORMs with INPUT TYPE=TEXT should be generating values of '', not NULL.

Or, at least, they always did before...

In the short term, you could probably alter any NULL value to '' before
shoving it into LDAP, and LDAP will probably like '' much better than NULL.

#0 is basically just LDAP's way to represent NULL, most likely.

>    $info["mail"]="";  // <----- NULL VALUE HERE
>    // The following lines also produce the same result.......
>    //$info["mail"]=NULL;  // <------- NULL value here
>    //$info["mail"]="\0";  // <------- NULL value here
>    //$info["mail"];       // <------- NULL value here

Whoa!

Never mind.

Something is very broken in the LDAP stuff if '' and NULL from PHP are being
turned into NULL in LDAP, and then LDAP complains about it...

Start looking at http://bugs.php.net

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to