Hi,
Can any one hel with this. My ISP (running Apache & Redhat 6.2) have informed me that I have global write permission to my directory (CHMOD 777). I am using the most basic file upload script there is - see below. The ISP have given me this path as absolute - /home/httpd/html/sitesphp/domain/directory - I always get this error -
Warning: Unable to create '/home/httpd/html/sitesphp/www.hotelwestport.ie/cws/tmp': Permission denied in /home/httpd/html/sitesphp/www.hotelwestport.ie/cws/send.php on line 4
Any help would be most appreciated - steve
PHP START TAGS
// In PHP 4.1.0 or later, $_FILES should be used instead of $HTTP_POST_FILES.
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
copy($HTTP_POST_FILES['userfile']['tmp_name'], "/home/httpd/html/sitesphp/www.hotelwestport.ie/cws/tmp");
} else {
echo "Possible file upload attack. Filename: " . $HTTP_POST_FILES['userfile']['name'];
}
/ ...or... /
move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], "/home/httpd/html/sitesphp/www.hotelwestport.ie/cws/images/");
PHP END TAGS