I try to write a hook for "reset_password" event. Hook code looks simply:
Code:
global $newpassword;
$fp = fopen("reset_password.txt", "w");
fputs($fp, $newpassword);
fclose($fp);
But when it is active and has been called (e.g., when user follows a link in his email when he losts password), I'v got a blank screen instead of standard "password reseted" message. vBulletin is not crashes at all, it continues work after calling hook, for example, sends an email with new password to user. When I remove all file operations (just leave string "$x = $newpassword") the forum works properly.
The site has been installed on my local computer (Windows XP, Apache 1.x, PHP 5, MySQL 5), I have administrator rights (all filesystem operations are accessible).
What is the matter? If the code above generates some error, how can I view it?