|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-09-13 15:10 UTC] lucas dot bru at terra dot com dot br
Description:
------------
Hi. the function ldap_add dont accpet if the array data haves international characters like as "jos?". See the code below.
Reproduce code:
---------------
$info["uid"] = $_POST['uid'];
$info["userPassword"] = $_POST['userPassword'];
$info["cn"] = $_POST['cn'];
$info["sn"] = $_POST['sn'];
$info["mail"] = $_POST['mail'];
$info["objectClass"] = "inetOrgPerson";
$dn = "uid=" . $_POST['uid'] . ", dc=thevip, dc=com,dc=br";
$result = ldap_add($conn, $dn, $info);
Expected result:
----------------
its works, but not if any data have latin characters like as "jos?" "ma?a" and all others
Actual result:
--------------
Warning: ldap_add() [function.ldap-add]: Add: Invalid syntax in /var/www.........
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 15:00:02 2025 UTC |
if ($_POST["submit"]) { include ('includes/conn_ldap.php'); $info["uid"] = $_POST['uid']; $info["userPassword"] = $_POST['userPassword']; $info["cn"] = $_POST['cn']; $info["sn"] = $_POST['sn']; $info["mail"] = $_POST['mail']; $info["objectClass"] = "inetOrgPerson"; $dn = "uid=" . $_POST['uid'] . ",dc=localhost"; $result = ldap_add($conn, $dn, $info); } <form action="" method="post"> User:<input type="text" name="uid" size="20" value="<? echo $_POST['uid']; ?>"> <br /> Pass:<input type="password" name="userPassword" size="20" value="<? echo $_POST['userPassword']; ?>"> Pass again:<input type="password" name="confirmacao" size="20" value="<? echo $_POST['confirmacao']; ?>"> <br /><br /><br /> E-mail:<input type="text" name="mail" size="20" value="<? echo $_POST['mail']; ?>"><br /> First name:<input type="text" name="cn" size="20" value="<? echo $_POST['cn']; ?>"> Last name :<input type="text" name="sn" size="20" value="<? echo $_POST['sn']; ?>"> <br /><br /><br /> <input type="submit" value="Submit" name="submit" /> <input type="reset" value="Clear" name="reset" /> </form>