WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] File Upload Limit? (6 posts)

  1. seanpatrick
    Member
    Posted 4 years ago #

    I am trying to utilize the File Upload function in Contact Form 7 and have it working fine, but only if files are under 1MB in size. It doesn't seem to be a PHP problem (another plugin uploads larger files fine) and the permissions for both the temporary and parent folders are set properly (obviously, since it's working).

    Where all could this limit value be coming from and is there a way to resolve this?

    Thanks!

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

  2. Takayuki Miyoshi
    Member
    Posted 4 years ago #

    1MB is default limit of file size. You need to specify the limit: option. See this post.

    File Uploading and Attachment

  3. BrianChicago76
    Member
    Posted 4 years ago #

    I am having the same problem. I am trying to set a limit of 4MB, but it seems like I can only upload up to 2MB. Here is my setting in the plugin:

    [file* file-submission limit:4200000 filetypes:.mpg|.mp4|.mov|.wmv|.flv]

    Also, I went into php.ini file and upped the following values:

    max_execution_time = 240
    memory_limit = 200M
    post_max_size = 100M
    upload_max_filesize = 50M

    But whenever I try to upload a file over 2MB, it gives me the message "Failed to upload file. Error occurred." in red under the file attachment box and the message "Validation errors occurred. Please confirm the fields and submit it again." in a yellow box at the bottom of the form.

    Please advise.

  4. BrianChicago76
    Member
    Posted 4 years ago #

    UPDATE: I just checked an error log I found in my the root directory for the WP site running the plugin. It indicated that the failure occurred because "upload_max_filesize of 2097152 bytes exceeded". So that would indicated the limit IS 2MB... but why would that be the case if I altered the php.ini file? Could I have altered the wrong one? Where would the correct one be located? Thanks.

  5. BrianChicago76
    Member
    Posted 4 years ago #

    Well, answered my own question, and you should probably pass this along to people having similar issues, unless it's a DUH kind of thing:

    php.ini needs to be located in the root folder of your WP site. I am running a WP site in a subdirectory on my main site and I was editing php.ini there. As soon as I copied the file into the root for the WP site it all works fine.

  6. BrianChicago76
    Member
    Posted 4 years ago #

    DUH.

Topic Closed

This topic has been closed to new replies.

About this Topic