1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug xf 1.0 uploading attachment PDF 11mb stucked at 100%

Discussion in 'Resolved Bug Reports' started by swatme, Mar 10, 2011.

  1. swatme

    swatme Well-Known Member

    hi

    in xf 1.0
    when uploading attachment of pdf file of 11mb, its stucked to 100%
    and thus the file cant be attached.

    note:
    -max size attachment was set to 20mb
    -flash uploader was used
     
  2. Tigratrus

    Tigratrus Well-Known Member

    Maybe a PHP memory or timeout problem?
     
    D.O.A. and Dean like this.
  3. Wuebit

    Wuebit Well-Known Member

    Confirmed 20mb pdf stuck on 100%
    pdf.jpg

    I have 128mb post and upload with 0 timeout in PHP also
     
  4. D.O.A.

    D.O.A. Well-Known Member

    I can reproduce this by setting post & upload to 128M as you have, my memory limit is also set at 128M.
    Increasing this to 512M & restarting apache sees the pdf upload fine :)

    php.ini
    PHP:
    Maximum amount of memory a script may consume (128MB)
    http://php.net/memory-limit
    memory_limit 512M
    According to php.net memory_limit should be larger than post_max_size. 256M should even do it.
     
  5. Tigratrus

    Tigratrus Well-Known Member

    A quote from Mike in an import issue I ran into:
     
    D.O.A. likes this.
  6. Mike

    Mike XenForo Developer Staff Member

    There are several PHP settings that need to be increased to support large uploads. You will need to add the following lines to your .htaccess:

    php_value upload_max_filesize 20M
    php_value post_max_size 20M
     
    Vodkaholic likes this.
  7. swatme

    swatme Well-Known Member

    the setting above got error in .htaccess

    so i will use php.ini instead (php suexec environment)

    where should i put the php.ini file with the ff contents?
    upload_max_filesize= 20M
    post_max_size =20M

    only in root folder where index.php is located?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    The php.ini file should be in your web root.
     
  9. swatme

    swatme Well-Known Member

    thanks.

    i realized you should double + extra your memory limit to the max file size.
    ex for 20mb file, set it to 50mb
     
  10. glorify

    glorify Well-Known Member

    Mike,

    If I set the memory in config.php, then do your ad to the .htaccess, would I then have to restart apache?

    I tried without restarting and it didn't fix the problem. I changed my upload size in the admincp before I knew it would fork up my flash uploader :(

    Don't know my way around ssh to edit my php.ini.
     

Share This Page