ID:               30567
 Updated by:       [EMAIL PROTECTED]
 Reported By:      leticia dot borrajo at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         LDAP related
 Operating System: Linux Fedora Core 1
 PHP Version:      4.3.8
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is not support forum to ask HOW to use PHP.


Previous Comments:
------------------------------------------------------------------------

[2004-10-26 18:16:59] leticia dot borrajo at gmail dot com

Description:
------------
We work with OpenLDAP 2.1.22 and PHP 4.3.8
I'm working in a set of applications to manage our LDAP directory.
We archive into the LDAP information about users, and need to save
spanish characters, such as "á", "ñ",...
So when I try to add an entry into the ldap, I apply "utf8_encode" to
some attributes. By the moment these attributes are: 'cn', 'sn' and
'gecos'.
When this happens, I have 2 problems:
1. In 'sn' there use to be 2 words, first surname and second surname,
and after apply utf8_encode, it deletes the second surname.
2. When I try to add the entry into the ldap, I get an error and it
can't be done

Any idea?

Reproduce code:
---------------
The code is this:

$info['uid']=$uid;
$info['cn']=utf8_encode($cn);
$info['sn']=utf8_encode($sn);
$info['userPassword']="{MD5}".base64_encode(pack("H*",md5($clave)));
$info['gecos']=utf8_encode($gecos);
$info['ou']=$ou;
$ds=ldap_connect($servidor);
if($ds) {
        $user="cn=Administrador,o=ou.uvigo.es";
        $r=ldap_bind($ds,$user,$cla);
        if ($r)
        {
                $añade= ldap_add($ds,$usuario,$info);
                ...
        }
}

Expected result:
----------------
If everything were ok, I would see "Usuario añadido con éxito". Instead
of that I only get "Invalid syntax". 

Actual result:
--------------
The actual result is:

Warning: ldap_add(): Add: Invalid syntax in
/var/www/html/proyecto/crear_usuario.php on line 70


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30567&edit=1

Reply via email to