Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
When users register an account, their profile is supposed to be automatically created using fopen(), like so:
$fh = fopen($profile_path.$username_file.'.php', "w");
fwrite($fh, $tpl_and_values);
fclose($fh);
The first parameter for fopen()
, when the variable values are given, should be something like this: profile/Auser.php. $tpl_and_values
just gives the path to the template file.
Here are the errors I'm getting:
Warning: fopen(profile/givenusername.php) [function.fopen]: failed to open stream: Permission denied in /f5/tagzor/public/registeraccount.php on line 109
Warning: fwrite() expects parameter 1 to be resource, boolean given in /f5/tagzor/public/registeraccount.php on line 110
Warning: fclose() expects parameter 1 to be resource, boolean given in /f5/tagzor/public/registeraccount.php on line 111
(Registeraccount.php is the page where the code above resides.)
I'm thinking it has to be some kind of CHMOD permissions problem. Registeraccount.php is set to 655, so I don't really know what could be wrong. Giving it 777 might be a bad idea, but I could be wrong.