Thanks for the tip, but that really doesn't address the password reset error I'm having trouble with.
This is the block the error is being pulled from
function get_random_word($min_length, $max_length)
// grab a random word from dictionary between the two lengths
// and return it
{
// generate a random word
$word = "";
$dictionary = "/usr/dict/words"; // the ispell dictionary
$fp = fopen($dictionary, "r");
$size = filesize($dictionary);
// go to a random location in dictionary
srand ((double) microtime() * 1000000);
$rand_location = rand(0, $size);
fseek($fp, $rand_location);
// get the next whole word of the right length in the file
while (strlen($word)< $min_length || strlen($word)>$max_length)
{
if (feof($fp))
fseek($fp, 0); // if at end, go to start
$word = fgets($fp, 80); // skip first word as it could be partial
$word = fgets($fp, 80); // the potential password
};
$word=trim($word); // trim the trailing \n from fgets
return $word;
}
Here's the error:
Warning: fopen("/usr/dict/words", "r") - No such file or directory in /home/virtual/site69/fst/var/www/html/usertest/user_auth_fns.php on line 102
Warning: stat failed for /usr/dict/words (errno=2 - No such file or directory) in /home/virtual/site69/fst/var/www/html/usertest/user_auth_fns.php on line 103
Warning: fseek(): supplied argument is not a valid File-Handle resource in /home/virtual/site69/fst/var/www/html/usertest/user_auth_fns.php on line 108
Warning: feof(): supplied argument is not a valid File-Handle resource in /home/virtual/site69/fst/var/www/html/usertest/user_auth_fns.php on line 113
Warning: fgets(): supplied argument is not a valid File-Handle resource in /home/virtual/site69/fst/var/www/html/usertest/user_auth_fns.php on line 115
Warning: fgets(): supplied argument is not a valid File-Handle resource in /home/virtual/site69/fst/var/www/html/usertest/user_auth_fns.php on line 116
After the mention of line 116 it beings repeating the bolded warnings until you stop the browser.
Does this mean certain options are turned off on my server and I should get the administrator to turn them on?