Forums

Contact Form 7
Contact Form 7 - File Upload Size Failing (9 posts)

  1. choppysticks
    Member
    Posted 9 months ago #

    Hi there,

    I have a problem with my form using WordPress Plugin Contact form 7. Everytime I upload a file over 1mb, I get an error telling me the message failed and that I should try again. Anything under 1mb is fine.

    I changed my php.ini settings to:

    max_execution_time = 200
    max_input_time = 60
    memory_limit = 200M
    upload_max_filesize = 10M

    I changed my contact form 7 settings to:

    [file image-upload limit:10240kb filetypes:gif|png|jpg|jpeg]

    problem still remains the same. I've spent 3 hours trying to figure this out and I'm desperate for some help. Anyone has any advice?

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 9 months ago #

    Check phpinfo output. Are those settings really applied?

  3. choppysticks
    Member
    Posted 9 months ago #

    Sorry Takayuki, I'm not really sure how to do that. I know its not related to your plugin, but could you help me out? :$

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 9 months ago #

    How to use phpinfo() with a phpinfo.php file

    This post would be helpful. Then you'll find in the output those parameters max_execution_time, max_input_time, memory_limit, and upload_max_filesize. Try to search them. Are those values same as what you intended?

  5. choppysticks
    Member
    Posted 9 months ago #

    Hi Takayuki, thank you for the help with phpinfo. I have checked and yes the values are same as what I intended.

    I have spent a whole night and morning trying to figure this out. All the values I have changed are what they are supposed to be.

    It narrows down to the default setting of the Form which you mentioned in the FAQ was 1mb. Anything under 1mb uploads without a problem, anything over I get a Message Error.

    I have even went into plugin edit menu and changed the form settings:

    contact-form-7/modules/file.php

    $allowed_size = 10485760;

    But I still get the same problem that I had before.

  6. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 9 months ago #

    What size is post_max_size value in the phpinfo output?

  7. choppysticks
    Member
    Posted 9 months ago #

    It says 20M

  8. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 9 months ago #

    Everytime I upload a file over 1mb, I get an error telling me the message failed and that I should try again.

    What is the exact error message? If the issue is caused due to PHP settings for file uploading, you should see "Failed to upload file.", and if it's due to Contact Form 7's file size limit setting (limit:10240kb), you should see "This file is too large." (those are default English messages).

    If your error message is different than them, it might be a problem happening when you send mail with file attachments, not when uploading files to the server. You should ask your hosting provider if they have any restriction about file attachment on there mail server.

  9. choppysticks
    Member
    Posted 9 months ago #

    Hi Takayuki,

    The error I get simply says "Failed to send your message. Please try again" in red.

    I dont think my hosting provider has a restriction on file attachment on the fail server because I am able to attach files larger than 1mb when sending mail to and from the mail server not using the form.

    Thank you!

Reply

You must log in to post.

About this Plugin

About this Topic