Support

Akeeba Backup for Joomla!

#28381 upload_max_filesize

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by on Sunday, 08 October 2017 17:17 CDT

joomleb
Hi guy,
as we know we should set up:
- upload_max_filesize = 10M
- post_max_size = 10M

to have Akeeba Backup work properly. As far as I know upload_max_filesize intervenes when we upload Components etc. in Joomla. Only in that moment, Right ?

Now, waiting an HikaShop File Field improvements (question 3 into the link), we should have to set upload_max_filesize to 1MB for a time period (waiting to add the feature to that field).

Please, Is there a way using "Admin Tools - .htaccess Maker" to exclude from Server limit Joomla uploads and all Installed Components ?
Or, Is there a way using "Admin Tools - .htaccess Maker" to limit only .pdf files ?
Do you have any suggestions on how ?

If no, we would reduce risks setting the limit of 1MB on the Server and change it just only during Joomla and Components upgrades, Am I right ?

Many Thanks for Support

nicholas
Akeeba Staff
Manager
No. Whoever gave you that advice should be tarred, feathered and stringed. The upload and POST size are not security features. They are preferences. The max upload size defines what is the maximum size a single file uploaded to your server can be. When hosting accounts had 20MB of disk space it made sense to set it to 50K or less. With hosting accounts having several GB of space and upload security being orders of magnitude improved over the early '00s there is no point having this too low.

The maximum POST size defines what is the maximum size of data a POST request can have. This does not apply just to downloads. It has to be at least the max upload file size times the number of files you expect to upload at any given time.

Akeeba Backup DOES NOT have a requirement for these settings. The only thing you can upload to Akeeba Backup is exported settings files which are less than 100KB.

Joomla!, however, lets you install extensions by uploading their packages to your server. By necessity of having to upload files, both of these settings need to be at least as high as the size of the package you are uploading. Akeeba Backup IS NOT the only extension that's around 2.4MB. Last time I checked, HikaShop was a hefty extension too.

Also, upload & install is NOT the only method to install extension. Akeeba Backup in particular (and all of our extensions) has embraced the Install From URL since 2012, when Joomla! made it technically possible. When you go to the Download page you can click on All Files and then copy the Direct Link URL. There are instructions on that page about how to use this feature of our site.

Key points:
1. There is no need to set these settings so low; they offer no security
2. Even if you do, you are NOT violating a requirement of our software; you just make it impossible to install any extension of substantial size on your site.
3. If you want to install our software despite such a low setting you can always do that with Install from URL.

I hope that helps :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomleb
Hi Nicholas,
really, really, Many Thanks for the explanation, so detailed, so clear.

So, before to change "permanently" my Server settings and waiting the HikaShop File Field improvements, we could test the upload_max_filesize to 1MB set up using "Admin Tools - .htaccess Maker" to reduce the limit in a specific Joomla site will use to test it.

Adding the following lines in our .htaccess file may work:
php_value upload_max_filesize 1M
php_value post_max_size 1M

Am I right ?

nicholas
Akeeba Staff
Manager
It depends. If your server is using PHP over CGI/FastCGI and it allows setting up PHP variables through .htaccess, yes, it will work. If they are using PHP-FPM (FastCGI Process Manager) it may take a long time or a service restart for the new values to take effect. On some servers you may have to use a .user.ini file instead - or another name, depending on how your server is configured.

So this is really something you should ask your host. The answer is contingent to how they've configured the server.

I can tell you that on my Apache servers (live and testing) I use FastCGI and I do allow PHP configuration variables to be set through the .htaccess file. Therefore on my servers what you said is correct :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomleb
I can only say: Many Thanks !

..."We will only find it by living"... :)

nicholas
Akeeba Staff
Manager
You are welcome! I am glad I could help you :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomleb
Please, into my .htacces I have yet added:

Custom .htaccess rules at the top of the file:
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)
RewriteRule .* - [F]

Would be better trying to add
php_value upload_max_filesize 1M

php_value post_max_size 2M

into the same "Custom .htaccess rules at the top of the file" field or into the "Custom .htaccess rules at the bottom of the file" fied ?

nicholas
Akeeba Staff
Manager
It doesn't really matter. These directives are not positional :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomleb
Ok, just reporting my experience:

Modifying the .htaccess file I had back a 500 Internal Server Error.

My Server provider:
"Placing the code in .htaccess will not work on your server, instead create a .user.ini file and add the following:"

upload_max_filesize = 1M
post_max_size = 1M

Seem it's working...

nicholas
Akeeba Staff
Manager
I already told you you might need a .user.ini and that you should ask your host. Do you now see why I write this kind of responses? I am not trying to be difficult, I do not want to dismiss you, I am not masking ignorance (quite the contrary) and I am not trying to make your issue someone else's problem: I just know how servers work for I have configured plenty of my own. I also know that there's no way to know what will work unless you've either configured the server or have root access and nothing to do with your life. Hence my advice to ask the host before trying anything: they've configure the server and they know what will work and what won't work. It's the path of least resistance ;)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!