ID: 16406
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: LDAP related
Operating System: win, iis
PHP Version: 4.1.2
New Comment:
See, the LDAP module does in no way return any headers if it encounters
an error (that would render it useless for on-web application for which
I use it for example).
It's more likely a configuration error with your webserver or your
code, you should double/tripple check that first.
Previous Comments:
------------------------------------------------------------------------
[2002-04-03 03:01:50] [EMAIL PROTECTED]
I'm using IIS, Win2000, PHP 4.1.2, IPlanet 5.1. When I try to delete or
add an entry I receive the http header. This is a sample of the code:
if (!$ds=@ldap_connect($LDAP_SERVER[$SERVER_ID])) die("Unable to
connect");
if (!@ldap_bind($ds,$gebruiker,$passw)) {
$errno = ldap_errno($ds);
// error 49 wrong password, error 32 unknown user
if ($errno == 49 || $errno == 32) {
//call login function
showLogin();
} else {
die("Unable to bind");
}
if (!@ldap_delete($ds, $dn)) {
$errno = ldap_errno($ds);
//error 50 No Access
if ($errno == 50) {
showLogin($);
} else {
die ("Could not delete");
}
}
What this should do is delete an entry by first connecting to the
server, then bind to it and finally delete the specified entry.
When a bind is unsuccessful due to wrong access info a redirect to a
login screen is forced. This also goes for when an object has
insufficient right to delete the specified entry.
The function ldap_delete does return true or false, but when I don't
have sufficient access rights to delete an entry (errno 50) the below
http header is not processed by the webserver but returned to the
browser instead.
X-Powered-By: PHP/4.1.2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Location: http://www.somedomain.com/loginscreen.php
Content-type: text/html
This problem also occurs when I don't have proper rights to add an
entry with ldap_add.
These problems do not occur when I run the code on a Unix system and a
Apache webserver. So it might be the dll or IIS that's causing the
problems.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16406&edit=1