Thanks for the reply. Yes, I did all those stuff already, and what I found was that, though I'm getting the error if the user don't exist in MW table, if I refresh the browser, everything is ok and I can log in.
You made the changes to SpecialUserlogin.php right? What version of the plugin are you using (don't use the SVN HEAD version, use the latest release)?
Also, when you say ldap group synchronization, preference pulling,etc., Does it mean that in the userright page we'll get the user groups that exist in AD to select for a user to add to? Or the user_group table will be populated with the usernames and groups as in AD?
Essentially, since you are using AD (Active Directory) style binding (DOMAIN\USERNAME), adding the additional settings lets the plugin search for the user's bind DN (ex: cn=Test User,ou=Domain Users,dc=example,dc=com), allowing the plugin to then use the bind DN to search in groups, and pull user preferences. If the plugin did not have the bind DN, it would search AD for DOMAIN\USERNAME, which doesn't exist as far as AD is concerned. If you don't plan to syncronize user groups, syncronize preferences, or restrict users by LDAP groups, then those extra settings aren't really necessary (they don't really hurt either though).
What are correct setting for that? Mine is MW 193
With the exception of the two settings I mentioned, everything else looks good. Try setting "$wgLDAPDebug = 4", and see why the plugin is failing.
V/r,
Ryan Lane