php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44534 ldap_add() does not work
Submitted: 2008-03-25 19:12 UTC Modified: 2008-04-03 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: thegner at trilliumit dot com Assigned: fb-req-jani (profile)
Status: No Feedback Package: LDAP related
PHP Version: 5.2.5 OS: ubuntu gutsy server
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: thegner at trilliumit dot com
New email:
PHP Version: OS:

 

 [2008-03-25 19:12 UTC] thegner at trilliumit dot com
Description:
------------
when doing an ldap_add() with "Die" as a persons last name, the server returns unwilling to perform. If I change only the last name to "Die2" it operates as expected. In our environment the following user attributes are associated with the last name.

sn
cn
displayName
distinguishedName
sAMAccountName
mailNickname
userPrincipalName
unicodePwd

The ldap directory is Microsoft Active Directory on Windows Server 2003

Reproduce code:
---------------
<?php
$user_attributes['sAMAccountName'] = "tdie";
$user_attributes['mailNickname'] = "tdie";
$user_attributes['userPrincipalName'] = "tdie@domain.com";
$user_attributes['unicodePwd'] = "\"\000t\000d\000i\000e\000\"\000";
$user_attributes['givenName'] = "Test";
$user_attributes['sn'] = "Die";
$user_attributes['cn'] = "Die, Test";
$user_attributes['displayName'] = "Die, Test";
$user_attributes['objectClass'][0] = "top";
$user_attributes['objectClass'][1] = "person";
$user_attributes['objectClass'][2] = "organizationalPerson";
$user_attributes['objectClass'][3] = "user";
//$gc_con previously set to valid ldap_connect()
ldap_add($gc_con, "CN=Die\, Test,OU=Users,DC=Domain,DC=Com", $user_attributes);
?>

Expected result:
----------------
We should expect the object to be added to the directory.

Actual result:
--------------
Error: Add: Server unwilling to perform...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-25 19:15 UTC] thegner at trilliumit dot com
Sorry,

This Line: ldap_add($gc_con, "CN=Die\, Test,OU=Users,DC=Domain,DC=Com", $user_attributes);

should be: ldap_add($gc_con, "CN=Die\\, Test,OU=Users,DC=Domain,DC=Com",
$user_attributes);
 [2008-03-25 19:29 UTC] jani@php.net
If it crashes, you should be seeing something in the webserver's logs?
And if it really crashes, you should be able to provide a GDB backtrace.
 [2008-03-25 19:47 UTC] thegner at trilliumit dot com
@jani:
Perhaps I am using the word "crash" too loosely. To me, if it doesn't do what I expect, then it's crashed :).

Sorry for the mixup.
 [2008-03-26 11:49 UTC] jani@php.net
So it doesn't crash. Then what the actual problem is? What error do you get? (EXACTLY!) Did you check the ldap server's logs for possible reason?
 [2008-04-03 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: Thu Oct 31 23:01:28 2024 UTC