Click to See Complete Forum and Search --> : php/MySQL Problem - "Failed to open stream"????


blastbum
10-26-2004, 07:39 AM
Hi,

I got this error message when I tried to upload an image in my administration console:

Warning: copy(../client_images/msn.jpg): failed to open stream: Permission denied in /usr/local/psa/home/vhosts/northlakesclc.org.au/httpdocs/admin/_editor.php on line 718
Line 718 in "_editor.php" is the first line of the following:

if (!copy($HTTP_POST_FILES[img][tmp_name], $newimg) != FALSE ) {
$error = 1;
$errormes .= "<font style=\"font: 11.9px verdana; color: ".$settings[textcolor3].";\"><b>".$lang['error'].":</b> ".$lang['alert_no_dir']."&nbsp;</font>";
}
It all happened after I moved the site files out of the "the.plant" directory (www.northlakesclc.org.au/the.plant/) and moved them into the main directory (www.northlakesclc.org.au).

Any idea what the problem could be?

Any help would be greatly appreciated!!!!

Many thanks,

Dan

96turnerri
10-26-2004, 11:58 AM
yeah probably just you need to chmod() (http://uk2.php.net/manual/en/function.chmod.php) it, or you can do this via ftp if you wish set to 777 either way

blastbum
11-25-2004, 12:18 AM
Hi 96turnerri.

I'm still unsure as to what you mean. How do I go about setting it to 777?

I greatly appreciate your help.

Kind Regards,

Daniel :)

96turnerri
11-25-2004, 04:03 AM
chmod("/usr/local/psa/home/vhosts/northlakesclc.org.au/httpdocs/client_images/", 0777);

try that added it in your php code