PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

large file upload not working

  1. I'm using gravity forms with woocommerce on http://www.personalizedshowercurtains.com. I require customers to upload high resolution image files for printing, and it works fine as long as the image file is under about 3mb. When I try to upload an image file over 10mb it processes for a while and then just refreshes the page. I've changed max file upload in php.ini to 64mb and set the timeout time to 240, so I don't think this is the issue. I've tried adding the following lines in .htaccess as I found suggested in another thread, but it returns me an internal server error message.

    php_value upload_max_filesize 20M
    php_value post_max_size 20M
    php_value max_execution_time 240
    php_value max_input_time 240

    In the other thread it said that this meant I should contact my host, but I'm on a vps, and I talked to them and they said just to change php.ini in WHM and that they had no size limits on their end. I'm not sure if this is a GF issue or not, but I'm really hoping you can help me get this working. Thanks in advance.

    Posted 11 years ago on Monday January 28, 2013 | Permalink
  2. David Peralty

    The only way to test this would be to create a HTML/PHP form to test this independently of WordPress and Gravity Forms. Try this: http://www.w3schools.com/php/php_file_upload.asp

    All my best!

    Posted 11 years ago on Monday January 28, 2013 | Permalink
  3. but it returns me an internal server error message.

    If it returns an error, the directives are not supported in .htaccess or the syntax was incorrect. I would do as your host suggests and change the php.ini so the change is applied globally.

    After you have made the change, please share a link to a phpinfo file so we can see the changes in effect. You can add this to a file on your server called info.php then call it in your browser.

    [php]
    <?php
    php info ();
    // remove the space between php and info and ()
    ?>

    http://www.personalizedshowercurtains.com/info.php

    Posted 11 years ago on Monday January 28, 2013 | Permalink
  4. info.php uploaded.

    Posted 11 years ago on Monday January 28, 2013 | Permalink
  5. The other thing I would change in php.in is the memory. You have only 32M. WordPress has to perform all sorts of calculations on that image when it's uploaded, and it's the pixel dimension size which matters, not the file size in KB or MB. See specifically item 7 here from Otto:
    http://wordpress.org/support/topic/25-imagemedia-uploader-problems

    This line:

    memory_limit 32M

    Please see if you can get 64M or 128M and try a large image upload again.

    Posted 11 years ago on Monday January 28, 2013 | Permalink
  6. Tried 128, still didn't work. Tried 256, and its still not working. I can upload large files using n-media upload which makes me think its a gravity forms thing. It almost seems like the browser doesn't know that it's trying to upload something and refreshes the page after trying to connect to the next page for a certain amount of time. Is that a possibility?

    Posted 11 years ago on Monday January 28, 2013 | Permalink
  7. 128M should be fine.

    I've never heard of that problem with Gravity Forms.

    If you try from the form preview, can you upload a large file there?

    It seems like when the page refreshes, an error should be logged in a PHP or Apache error log (or even Apache access log maybe.)

    Can you turn on WP_DEBUG http://codex.wordpress.org/WP_DEBUG or any sort of logging from the host?

    Posted 11 years ago on Monday January 28, 2013 | Permalink
  8. jpfour23
    Member

    I'll add that I have the same problem. Can't figure it out. Other upload scripts work fine. My PHP settings are updated to allow large uploads & memory usage. But GF just won't upload a large image. It will upload a smaller image, but it cracks somewhere at a certain size.

    Posted 11 years ago on Saturday February 16, 2013 | Permalink
  9. @jpfour23, if you need help with this, please start a new topic and clearly state your problem. Let us know what size files seem to fail. Also, please paste a link to your php info so that we can check things like max_execution time and max_upload_size and memory_limit. Each issue is treated individually since there are so many variables.

    Posted 11 years ago on Monday February 18, 2013 | Permalink