Hi
I'm getting an error message :
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'keyword-c5c70867b2d4cff7.jpg' for writing: Permission denied in etc/new-site/includes/class.upload.php on line 287
it's part of an image upload - the image uploads ok and then i change its name - the problem comes when i try to resize it using
if($doResize==1){
$dst_img=ImageCreateTrueColor($exe_w,$exe_h);
imagecopyresampled($dst_img,$src_img,0,0,0,0,$exe_w,$exe_h,$old_w,$old_h);
if (preg_match("/png/",$system[1])){
imagepng($dst_img,$name);
}else{
imagejpeg($dst_img,$name);
}
imagedestroy($dst_img);
imagedestroy($src_img);
}
the line that's causing the error is
imagejpeg($dst_img,$name);
so i guess it doesn't have the right permissions but i can't see how to do a chmod on it - i tried
chmod($dst_img, 0777);
if (preg_match("/png/",$system[1])){
imagepng($dst_img,$name);
}else{
imagejpeg($dst_img,$name);
}
but that just said that the file didn't exist
has anyone got any ideas ???
thanks