The error is quite clear: "Permission denied".
Guessing that line 115 is this:
$file = fopen($files[$x]['tmp_name'],"rb");
you should check the file name there (e.g. by checking the return value of
fopen()
and showing an error message with the file name upon
FALSE
).
But before trying to access an uploaded file you should check for upload errors (see
PHP: Handling file uploads - Manual[
^]):
$file_err = $file['error'];
if($file_err != UPLOAD_ERR_OK){
$fileErr = "File upload failed";
}
else if($file_size > 2000000){
$fileErr = "Max allowed size is 2 MB";
}
[EDIT]
Member 13120366 commented:
its mai() function not the fopen() function
Searching the web for "php mail permission denied":
php - mail: failed to open stream: Permission denied? - Stack Overflow[
^].
It is probably the mail log file. If so, setup a log file for usage with PHP (
mail.log
in
php.ini) that has the necessary permissions.
[/EDIT]