|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49544 No international characters in ldap_add
Submitted: 2009-09-13 15:10 UTC Modified: 2009-10-13 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: lucas dot bru at terra dot com dot br Assigned:
Status: No Feedback Package: LDAP related
PHP Version: 5.3.0 OS: Ubuntu 9.10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-09-13 15:10 UTC] lucas dot bru at terra dot com dot br
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.........


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-14 09:52 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

 [2009-10-05 17:05 UTC] lucas dot bru at terra dot com dot br
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" /> &nbsp;&nbsp;<input type="reset" value="Clear" name="reset" />
 [2009-10-05 19:23 UTC]
For the 2nd time: Please provide a complete, self-contained example. 
You're still expecting us to guess what you might be passing the func.
 [2009-10-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 00:01:30 2024 UTC