This is a NetBSD 4.0 stable system using pkgsrc 2008Q1 packages. Dokuwiki is 2008-05-04 version.
I can reproduce this easily. When I enable either "mhash" or "mssql" extensions in php.ini nobody can login except for the first admin user that got setup in the initial install.php setup. They get an error along the lines of "bad username or password". If I comment out those extensions, everything works fine. I can toggle it on/off all day long with the same results. It's okay for me since I don't have other applications which need those on this server. But it'd be a showstopper for others who run Virtual hosts using the same PHP install that have applications that need those extensions.
Also, I can reproduce this on another identical system with a different documentroot (Same OS and NAMP rig) but an older DokuWiki
Do you get any errors in the webserver error log? I can not reproduce this on a Debian System with PHP 5.2.0-8+etch11. Also can you try switching the password encryption method from smd5 to md5?
This might be fixed with the latest development release.
Because I can not reproduce the error, I will close this bug unless I get some feedback on my questions.