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

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
 

D.O.A.

Well-known member
Confirmed 20mb pdf stuck on 100%
I have 128mb post and upload with 0 timeout in PHP also
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.
 

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
 

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?
 

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
 

glorify

Well-known 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
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.
 
Top