mundor
(Ricardo)
May 26, 2017, 2:40pm
1
NethServer Version: NethServer release 7.3.1611 (Final)
Module: Roundcube Webmail 1.1.9
Hello,
I need to change the maximum attachment size in Roundcube from 2Mb to 8Mb, but it does not work.
I changed in /etc/php.ini
Upload_max_filesize = 8M
Post_max_size = 8M
But in Roundcube it is not updated. How do I solve it?
dnutan
(Marc)
May 26, 2017, 3:15pm
2
Did you reloaded/restarted apache after the change?
There are some php properties that can be changed with config
and db
commands, without having to manually edit the file.
config setprop php UploadMaxFilesize 8
config setprop php PostMaxSize 8
signal-event nethserver-php-update
3 Likes
Hello @dnutan , sorry for jumping into this support post…but I wanted to confirm something about these config and db commands you’ve listed. Does this change to UploadMaxFilesize and PostMaxSize in PHP also affect the upload size for other apps like Nextcloud? Or are these commands only for mail?
Thanks!
mundor
(Ricardo)
May 26, 2017, 4:07pm
4
With the commands I work, but modifying the php.ini does not.
Thanks @dnutan
dnutan
(Marc)
May 26, 2017, 4:10pm
5
The changes are php wide, affecting other web apps using the base/default php version, unless custom settings are in use (for instance through .htaccess files).
It does not affect nextcloud and other applications using a different php version.
2 Likes
Right, this depends on the version of PHP used by each application. Good to know.
Thank you.
stephdl
(Stéphane de Labrusse)
May 27, 2017, 6:35am
7
for the default php version of centos, you can install nethserver-phpsettings from my repo, you will have a panel to trigger your settings.
https://wiki.nethserver.org/doku.php?id=module:phpsettings
2 Likes
capote
(Marko)
May 17, 2022, 9:36am
8
Hello,
Since the topic fits here exactly, I let the zombie revive…
I am also limited to 2 MB in Roundcube, although PHP is configured correctly.
Roundcube :
PHP:
Where can I persuade Roundcube to adopt the PHP settings?
Sincerely, MArko
ps.: I have also customized htaccess unsuccessfully
cat /etc/roundcubemail/htaccess
php_value upload_max_filesize 64M
php_value post_max_size 64M
dnutan
(Marc)
May 17, 2022, 11:17am
9
which roundcube version are you using, the one from standard repos (1.4.x) or roundcubemail-next (1.5.x that uses rh-php73-php-fpm and so the php files are elsewhere)
1 Like
capote
(Marko)
May 17, 2022, 11:28am
10
rpm -qa | grep roundcube
nethserver-roundcubemail-next-1.5.3-1.ns7.noarch
1 Like
stephdl
(Stéphane de Labrusse)
May 17, 2022, 1:17pm
11
however the next rpm update will change this file, I need to set it as a noreplace
3 Likes
dnutan
(Marc)
May 17, 2022, 1:45pm
12
Untested, but with the pointer of @stephdl I think you can edit /etc/opt/rh/rh-php73/php-fpm.d/000-roundcubemail.conf
and add the parameters you want:
php_value[upload_max_filesize] = 64M
php_value[post_max_size] = 64M
If it doesn’t work try restarting the webserver service or changing php_value to php_admin_value (not sure which one is required here)
However, bear in mind what Stéphane pointed out about the package update.
2 Likes
stephdl
(Stéphane de Labrusse)
May 17, 2022, 1:47pm
13
; user does not have write permission, create dedicated directories for this
; purpose.
;
; See warning about choosing the location of these directories on your system
; at http://php.net/session.save-path
php_value[session.save_handler] = files
;php_value[session.save_path] = /var/opt/rh/rh-php73/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/opt/rh/rh-php73/lib/php/wsdlcache
;php_value[opcache.file_cache] = /var/opt/rh/rh-php73/lib/php/opcache
);
use esmith::ConfigDB;
my $db = esmith::ConfigDB->open_ro() || die("Can't open config db");
my $MemoryLimit = $db->get_prop('dolibarr','MemoryLimit') || '128';
my $UpMaxFileSize = $db->get_prop('dolibarr','UploadMaxFilesize') || '4';
my $PostMaxSize = $db->get_prop('dolibarr','PostMaxSize') || '8';
my $MaxExecTime = $db->get_prop('dolibarr','MaxExecutionTime') || '0';
my $MaxFileUploads = $db->get_prop('dolibarr','MaxFileUploads') || '20';
$OUT .= "php_admin_value[memory_limit] = $MemoryLimit"."M\n";
$OUT .= "php_admin_value[upload_max_filesize] = $UpMaxFileSize"."M\n";
I would like to make something dynamic like I did here
2 Likes
stephdl
(Stéphane de Labrusse)
May 19, 2022, 12:41pm
15
2 Likes
stephdl
(Stéphane de Labrusse)
May 19, 2022, 1:31pm
16
thinking loudly, I set a 32MB size file for attachment, I bet it is too much, what could be the good size ?
1 Like
mrmarkuz
(Markus Neuberger)
May 19, 2022, 11:47pm
17
Most providers seem to allow at least 20MB.
2 Likes
capote
(Marko)
May 24, 2022, 8:07am
20
…and the right way to change the values is?:
[root@ns]# config setprop roundcubemail UploadMaxFilesize 24 PostMaxSize 24
[root@ns]# signal-event nethserver-roundcubemail-next-update
not like within the old docu signal-event nethserver-roundcubemail-update
to clear the opcache
[root@ns]# rm -rf /var/opt/rh/rh-php73/lib/php/opcache/*
[root@ns]# systemctl restart httpd rh-php73-php-fpm
but if i check… cat /etc/opt/rh/rh-php73/php-fpm.d/000-roundcubemail.conf
php_admin_value[memory_limit] = 512M
php_admin_value[upload_max_filesize] = 20M
php_admin_value[post_max_size] = 20M
php_admin_value[max_execution_time] = 300
php_admin_value[max_input_time] = 300
php_admin_value[max_file_uploads] = 20
The values remain unchanged.
Sincerely, Marko