php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #38864 LDAP error message incomplete
Submitted: 2006-09-18 08:38 UTC Modified: 2015-06-17 13:45 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:3 of 4 (75.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: sesser@php.net Assigned: mcmic (profile)
Status: Closed Package: LDAP related
PHP Version: 5CVS-2006-09-18 (CVS) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sesser@php.net
New email:
PHP Version: OS:

 

 [2006-09-18 08:38 UTC] sesser@php.net
Description:
------------
Quote from original bug/feature request reporter:

"if i have an datatype, that has for exaple a syntax to
be a number, and not to be empty phpldapadmin prints
out the error, but not the "additional information", in
comparison to the ldapadd, which does:

phpldapadmin error message:
Could not add object: <some dn>

LDAP said: Invalid syntax
Error number: 0x15 (LDAP_INVALID_SYNTAX)
Description: An invalid attribute value was specified. 

ldapadd error message with the same ldif:
ldapadd -H ldap://127.0.0.1:399/  -f foo  -D
"cn=admin,dc=loginbasedc" -x -w opensesame 
adding new entry "<some dn>"
ldap_add: Invalid syntax (21)
        additional info: homeState: value #0 invalid
per syntax



where homestate is the following:
objectIdentifier  homeState-oid   2.5.6.5.555.555850
attributeTypes: ( 2.5.6.5.555.555850 
		 NAME ( 'homeState' ) DESC 'sun Defined Attribute'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE
X-ORIGIN 'sun defined' )

and added in the MAY() section of the object declaration."

Comment by ldapadmin guys:

Unfortunately php_ldap doesnt return the additional info in
the error.

I would recommended that a feature enhancement request be
submitted to the php developers to get this additional
information.


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-21 21:18 UTC] jani@php.net
-Package: Feature/Change Request +Package: LDAP related -Operating System: Irrelevant +Operating System: *
 [2015-05-05 19:48 UTC] andreas at heigl dot org
This issue is addressed with https://github.com/php/php-src/pull/1261.

After that PR has been merged you should be able to get the additional message via 

ldap_get_option($conn, LDAP_OPT_DIAGNOSTIC_MESSAGE, $extended_error);

That is when the client lib supports it....
 [2015-06-17 13:45 UTC] mcmic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mcmic
 [2015-06-17 13:45 UTC] mcmic@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 01 07:05:52 2023 UTC