• I am having a problem sending multiple file uploads with CF7 when the files are over a certain size. I have spent many hours investigating and am unable to find a solution.

    The problem: If you uploade multiple files (2 or more) that are over approximately approximately 6MB in total (photos .JPGs) the message “Failed to send your message. Please try later or contact the administrator by another method.” is displayed.

    At first I thought this must be file size limits so I added this into a PHP.INI folder in the root of the WordPress site:

    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 300
    memory_limit = 768M

    That didn’t work so I also added this to the top of the functions.php:

    @ini_set( ‘upload_max_size’ , ’64M’ );
    @ini_set( ‘post_max_size’, ’64M’);
    @ini_set( ‘max_execution_time’, ‘300’ );

    That didn’t work either.

    I also added overrides into .htaccess.

    Checked configuration settings at every level.

    Made sure the sender email domain is the same as the hosted domain.

    There is nothing report reported in the Apache server log.

    Enabled debug mode and nothing is reported on screen or in a log.

    I changed the upload temporary folder for WCF7 and that made no difference either.

    During my testing, I tried the following combinations with 1, 2 and 3 file uploads for each of the upload fields in the form.

    test 1 = 1 – 300kb, 2 – 200kb, 3 – 450kb = works
    test 2 = 1 – 1.9mb, 2 – 1.9mb, 3 – 1.9mb = works
    test 3 = 1 – 2mb, 2 – 1.9mb, 3 – 1.9mb = works
    test 4 = 1 – 2.4mb, 2 – 2.4mb, 3 – 2.4mb = fails
    test 5 = 1 – 6.5mb = works
    test 6 = 1 – 6.5mb, 2 – 6.5mb = fails

    failure message = “Failed to send your message. Please try later or contact the administrator by another method.”

    Is it something to do with the combined file sizes being over 6mb? But why should that be the case if this is within the extended upload limits?

    Form includes:

    Please upload your photo     (Image files only, max file size 15mb)[file photo-upload1 limit:15mb filetypes:.jpg|.jpeg|.gif|.tiff|.tif|.bmp|.png]

    Please upload your photo     (Image files only, max file size 15mb)
    [file photo-upload2 limit:15mb filetypes:.jpg|.jpeg|.gif|.tiff|.tif|.bmp|.png]

    Please upload your photo     (Image files only, max file size 15mb)[file photo-upload3 limit:15mb filetypes:.jpg|.jpeg|.gif|.tiff|.tif|.bmp|.png]

    Mail page, file attachments:

    [photo-upload1][photo-upload2][photo-upload3]

    I really hope someone can help with this as it would benefit me and hopefully others too. Others who have implemented other solutions to get round this issue.

    Many thanks,

    Rob

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Have you checked PHP error log?

    Thread Starter rwassell

    (@rwassell)

    @takayukister

    Thank you for your prompt reply.

    PHP wasn’t logging, but it is now.

    With debugging enabled in wp-config.php, an error is logged: PHP Notice: wpcf7_add_shortcode is deprecated since Contact Form 7 version 4.6! Use wpcf7_add_form_tag instead. in /…/wp-content/plugins/contact-form-7/includes/functions.php on line 351
    I do not believe this is related to the problem though as even with debugging disabled, there is no error reported in the php error log but the problem still occurs.

    Having thought of and checked everything the only other thing I can think to mention is that we are using Varnish web cache on our server. Could this be the problem?

    Rob

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    The error would not be related directly to the issue, but giving a clue. You have a plugin (or theme) not updated and using deprecated functions. It is possible it is causing other issues somehow.

    As for Varnish, I’m not familiar with it, but I guess it’s a possibility, too.

    Thread Starter rwassell

    (@rwassell)

    @takayukister

    Thank you, I will investigate that likelihood further.

    After further investigation it is unlikely to be Varnish as it is a cache for delivering web content and doesn’t affect POST.

    Rob

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple file uploads Failed to send your message’ is closed to new replies.