We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Increase upload_max_filesize
-
- Posts: 9
- Joined: Tue Feb 21, 2017 4:20 pm
Increase upload_max_filesize
I'm trying to increase the upload_max_filesize from 2M to 10M, however I'm struggling to do it. I'm running the latest versions of Ubuntu 16.04 and PHP7. I've tried modifying the php.ini file in /etc/php/7.0/apache2/ as well as the apache2.conf file in the users conf folder. I've even tried modifying the .htaccess file, and none of it fixes the problem after restarting the server.
Does anyone know what's going on and how to resolve this?
Does anyone know what's going on and how to resolve this?
Last edited by thunderclap on Tue Feb 21, 2017 4:48 pm, edited 1 time in total.
-
- Posts: 9
- Joined: Tue Feb 21, 2017 4:20 pm
Re: Increase upload_max_filesize
So it turns out it actually IS working, just not on one site for some reason. Basically, I have one domain and two subdomains set up on one users account. Both subdomains are picking up the configuration for the upload_max_filesize, but the main domain isn't. I guess I'll have to do some more digging.
Re: Increase upload_max_filesize
I just had a problem with this. Are you working in your /webmail/ directory? I was trying to import a 5Mb .vcf file and it wouldn't let me do it.
I thought the best way to deal with this would be to add the relevant lines to the .htaccess file. (Changes to this file are picked up immediately: no need to restart apache).
First of all I put a phpinfo.php file in the root of my domain:
And when I loaded it <http://domain.com/phpinfo.php> it confirmed that my limit was 2M. After adding the lines
to .htaccess, it went up to 10M. But I still couldn't upload the file in http://domain.com/webmail/
I then went hunting, and found that roundcube has its own .htaccess file so I changed the values in there. But roundcube still wouldn't let me upload a 5Mb file. In the end this process was taking me more time than splitting the file into 3 chunks, so I did that. But I'd still like to get to the bottom of it.
Update: Found two problems and now it's working! So, first of all, roundcube has TWO .htaccess files. The first one in /usr/share/roundcube is not used! Ignore that one.
The second one in /var/lib/roundcube is the one to use. It's also symlinked to /etc/roundcube/htaccess, so you can also edit that one.
Second problem. I have php7 on my server, so the .htaccess file needs to be edited. Change <IfModule mod_php5.c> to <IfModule mod_php7.c>, and now the settings are observed. I'll suggest this as a bug on github. Thunderclap, does this resolve your problem?
I thought the best way to deal with this would be to add the relevant lines to the .htaccess file. (Changes to this file are picked up immediately: no need to restart apache).
First of all I put a phpinfo.php file in the root of my domain:
Code: Select all
<?php
phpinfo();
?>
Code: Select all
php_value upload_max_filesize 10M
php_value post_max_size 10M
I then went hunting, and found that roundcube has its own .htaccess file so I changed the values in there. But roundcube still wouldn't let me upload a 5Mb file. In the end this process was taking me more time than splitting the file into 3 chunks, so I did that. But I'd still like to get to the bottom of it.
Update: Found two problems and now it's working! So, first of all, roundcube has TWO .htaccess files. The first one in /usr/share/roundcube is not used! Ignore that one.
The second one in /var/lib/roundcube is the one to use. It's also symlinked to /etc/roundcube/htaccess, so you can also edit that one.
Second problem. I have php7 on my server, so the .htaccess file needs to be edited. Change <IfModule mod_php5.c> to <IfModule mod_php7.c>, and now the settings are observed. I'll suggest this as a bug on github. Thunderclap, does this resolve your problem?