When trying to register with safemode = On, you get an error when the wiki is trying to send the email with the password. This happens because since version 4.2.3 of PHP, the $parameters parameter to the function is disabled when running in safemode, and mail will always return false when it's supplied.
Commenting out the $parameters argument to the function solves this problem.
See:
http://www.php.net/manual/en/function.mail.php