From: michael dot siebke at keymile dot com
Operating system: Linux (Redhat 8)
PHP version: 5.0.1
PHP Bug Type: LDAP related
Bug description: ldap_search does not work on Windows 2003 directories (but other
tools do)
Description:
------------
It's not possible to search a Windows 2003 active directory using the LDAP
interface (Windows 2000 works fine). However, using other tools (like LDAP
browers), searching the Windows 2003 directory works. The problems occurs
only using the PHP library.
Reproduce code:
---------------
$connect = ldap_connect("[i]server.domain.de[/i]");
if ($connect != FALSE) {
$res = ldap_bind($connect, "[i]username[/i]", "[i]password[/i]");
if ($res == FALSE) {
echo "Unable to bind to LDAP server<br>";
exit;
}
$attributes = array("sAMAccountName", "dn", "mail");
$data = ldap_search($connect, "[i]DC=company,DC=de[/i]",
"(sAMAccountName=[i]targetaccount[/i])");
if ($data != FALSE) {
echo "Reading data...<br>";
$data = ldap_get_entries($connect, $data);
} else {
echo "Nothing :-(<br>";
}
ldap_close($connect);
}
Expected result:
----------------
"Reading data..."
Actual result:
--------------
Warning: ldap_search() [function.ldap-search]: Search: Operations error in
/data/htdocs/hd5dev/Test.php on line 57
Nothing :-(
--
Edit bug report at http://bugs.php.net/?id=30670&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30670&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30670&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30670&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30670&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30670&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30670&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30670&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30670&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30670&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30670&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30670&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30670&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30670&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30670&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30670&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30670&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30670&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30670&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30670&r=mysqlcfg