|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-03 05:25 UTC] mfischer@php.net
[2002-04-03 07:16 UTC] aede dot vander dot weij at cgey dot nl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
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.