Thread Starter
yzhak
(@yzhak)
Hello @yzhak ,
Thanks for reaching out, can you check and see if the folder “/wp-content/uploads/wp_dndcf7_uploads” is writable or exists?
The error is related to the file.php under /contact-form-7/includes/file.php, in this function wpcf7_file_messages.
So I’m not sure why it’s showing in my plugin.
Can you provide a link to your site where the form was added?
Thanks,
Glen
Thread Starter
yzhak
(@yzhak)
Yes it’s writable
https://prnt.sc/ZTqgLIcasr0y
also I debuged
$_FILES array
$file = isset( $_FILES[$name] ) ? $_FILES[$name] : null;
and it returns
https://prnt.sc/rkWT9tTfimij
Thread Starter
yzhak
(@yzhak)
Also error message goes from you plugin settings https://prnt.sc/f8AjLYa8TD6J https://prnt.sc/tUguIYS7GuMZ
-
This reply was modified 1 year, 8 months ago by
yzhak.
Thread Starter
yzhak
(@yzhak)
Trouble is in the move_uploaded_file function
tmp filename is /tmp/phpHVgBhb
new_filename is /var/www/html/wordpress/wp-content/uploads/wp_dndcf7_uploads/wpcf7-files/shuf.jpg
-
This reply was modified 1 year, 8 months ago by
yzhak.
Thanks for letting me know.
Can you add this code to debug above the is_uploaded_file condition? https://prnt.sc/pt-maCDY9APw
var_dump( is_uploaded_file( $file['tmp_name'] ) )
if ( ! is_uploaded_file( $file[‘tmp_name’] ) ) {
And also this code above move_upload_file condition this. https://prnt.sc/UOAgSUdfAxyf
var_dump( move_uploaded_file( $file['tmp_name'], $new_file ) );
if ( false === move_uploaded_file( $file[‘tmp_name’], $new_file ) ) {
Please let me know the result.
Thanks.
Thread Starter
yzhak
(@yzhak)
/var/www/html/wordpress/wp-content/uploads/wp_dndcf7_uploads/wpcf7-files is writable
/tmp also writable and redable
-
This reply was modified 1 year, 8 months ago by
yzhak.
Thanks for letting me know with all the info.
It’s weird we’re my plugin and standard cf7 file upload are almost the same process and use function move_uploaded_file function.
Can you compare the wpcf7_uploads and wp_dndcf7_uploads folder if it’s has the same number permission?
Thread Starter
yzhak
(@yzhak)
/var/www/html/wordpress/wp-content/uploads/wp_dndcf7_uploads/wpcf7-files has root owner.