Req #38864 [Opn->Csd]: LDAP error message incomplete

From: Date: Wed, 17 Jun 2015 13:45:16 +0000
Subject: Req #38864 [Opn->Csd]: LDAP error message incomplete
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193610@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=38864&edit=1

 ID:                 38864
 Updated by:         mcmic@php.net
 Reported by:        sesser@php.net
 Summary:            LDAP error message incomplete
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            LDAP related
 Operating System:   *
 PHP Version:        5CVS-2006-09-18 (CVS)
-Assigned To:        
+Assigned To:        mcmic
 Block user comment: N
 Private report:     N

 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------
[2015-05-05 19:48:00] 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....

------------------------------------------------------------------------
[2006-09-18 08:38:38] 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.



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



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


Thread (3 messages)

« previous php.bugs (#193610) next »