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

XF 1.3 File size issue

Brogan

XenForo moderator
Staff member
#2
You will need to increase post_max_size and upload_max_filesize in php.ini.

Navigate to admin.php?tools/phpinfo to check what they are currently.
 

rwm1962

Active member
#3
They are 128M & 2M currently

Can you advice what I would I need to change them to? Is this change within my XF directory or server side?
 

Brogan

XenForo moderator
Staff member
#4
I would suggest 20M for the one which is currently 2M.

Ideally change it in php.ini if you can, otherwise you can edit .htaccess, for example:
Code:
php_value upload_max_filesize 20M
php_value post_max_size 20M
 

rwm1962

Active member
#8
I just pasted it onto end of htaccess & no difference. I'm currently on shared hosting. Would that matter? Would my htaccess overide php.ini?

It seems I can't post images over 2mb
 

rwm1962

Active member
#10
Sorted - many thanks. My XF site was calling on the file on the shared. I have my own custom php.ini on another domain already set to 20M (my host reminded me). Copied across to the XF folder & it's working great. Just uploaded 8mb image & happy to see it resized down to 1.8mb. Not be that mad on the live site!
 

AndyB

Well-known member
#11
There is one other setting you should be aware of. Due the very large files modern cameras create, you will want to add this to your config.php file:

$config['maxImageResizePixelCount'] = 30000000;
 

rwm1962

Active member
#12
Thanks Andy - for info, what does that do that php.ini & the ACP doesn't? I'm all for users being able to upload huge files as long as they are well optimised automatically in the process.