mantisBT 2.5.0
mariadb/MySQL 5.5.56-MariaDB
CentOS Linux release 7.4.1708
I've recently implemented mantisbt 2.5.0 as a replacement for our long standing previous 1.2.3. everything is tickety boo.
I then was requested to increase the max upload file size to 8MB - I tweaked the "obvious" parameters and it just worked fine.
I was then asked to increase that to 32 MB. So I tweaked the same things. And.. it sort of works... but doesn't. By that I mean I can upload a file up to 17 MB (17815306 bytes) fine - it adds immediately.
But anything above 17Mb (eg 17.01 MB) doesn't; load - it looks as if it is loadin ie the green swirly bar starts... but never completes.
*sigh*
These are my configurations (FWTW)
/etc/php.ini
post_max_size = 32M
upload_max_filesize = 32M
/var/www/html/config/config_inc.php
$g_max_file_size = 33554432; # 32 MB
I've even tweaked the DB configs too
/etc/my.cnf
$g_allow_file_upload = ON;
$g_file_upload_method = DATABASE; # or DISK DATABASE
$g_max_file_size = 33554432; # 32 MB
also
max_allowed_packet=2048
Has anyone else had any success with altering upload limits to these levels?, or has any idea why >17 MB just "spins" rather than uploading immediately <=17MB
17MB seems such an odd number too!
ian
32MB file uploads - how?
Moderators: Developer, Contributor
Re: 32MB file uploads - how?
FTR I've n ow also tried
/etc/php.ini
post_max_size = 35M
upload_max_filesize = 35M
as it was suggested to me that I make these a little larger than the mantis limits to provide some overhead. No difference
ian
/etc/php.ini
post_max_size = 35M
upload_max_filesize = 35M
as it was suggested to me that I make these a little larger than the mantis limits to provide some overhead. No difference
ian
Re: 32MB file uploads - how?
You added those lines to my.cnf? This would make no sense, maybe you mean config_inc.phpdidds wrote: I've even tweaked the DB configs too
/etc/my.cnf
$g_allow_file_upload = ON;
$g_file_upload_method = DATABASE; # or DISK DATABASE
$g_max_file_size = 33554432; # 32 MB
For 32MB this should bedidds wrote: also
max_allowed_packet=2048
Code: Select all
max_allowed_packet = 32M
Don't forget to restart the database after such kind of changes.
Re: 32MB file uploads - how?
I only changed some parameters in my.cnf for the DB in case that was an issue.
The 2048 was a typo and is indeed 2048M - it needed to be that large to import the DB from its original/previous "home". Its larger than 32MB anyway so should be fine.
As you will see above I've also set various parameters in config_inc.php
$g_max_file_size = 33554432; # 32 MB
and also in /etc/php.ini
post_max_size = 35M
upload_max_filesize = 35M
everything is of course restarted (DB and httpd).
a 17MB file uploads/attaches immediately. A 17.01 MB file doesn't - its just "spins".
ian
The 2048 was a typo and is indeed 2048M - it needed to be that large to import the DB from its original/previous "home". Its larger than 32MB anyway so should be fine.
As you will see above I've also set various parameters in config_inc.php
$g_max_file_size = 33554432; # 32 MB
and also in /etc/php.ini
post_max_size = 35M
upload_max_filesize = 35M
everything is of course restarted (DB and httpd).
a 17MB file uploads/attaches immediately. A 17.01 MB file doesn't - its just "spins".
ian
Re: 32MB file uploads - how?
To find out if this is a database issue, you could temporarely change the storage to disk.
Don't forget to set the upload path in project settings, and run admin/check/index.php to check if all is right.
Code: Select all
$g_file_upload_method = DISK;
Re: 32MB file uploads - how?
In case you are unable to do, I found hard way on Synology DSM.
Change is required at 3 locations
1> @MantisBT package configuration file (for case of Synology)
\web\mantisbt\config\config_defaults_inc.php
$g_file_upload_method = DATABASE;
$g_max_file_size = 9000000; (I have kept 9MB)
2 @ php.ini (/etc/php/...)
Check these entries
post_max_size = 32M
upload_max_filesize = 32M
3 database configuration (mysql/mariadb)
If there is no "my.cnf" file you can create it
(for Synology NAS) path is /var/packages/MariaDB/etc/my.cnf
and add below lines to the file
-------
[mysqld]
max_allowed_packet = 1073741824
---------
You will need admin privilege to create or modify file. modify file useing $sudo -i vim my.cnf file
Check below link if you need it for Synology
https://www.synology.com/en-sg/knowledg ... nology_NAS
Hope it helps to any one.
Change is required at 3 locations
1> @MantisBT package configuration file (for case of Synology)
\web\mantisbt\config\config_defaults_inc.php
$g_file_upload_method = DATABASE;
$g_max_file_size = 9000000; (I have kept 9MB)
2 @ php.ini (/etc/php/...)
Check these entries
post_max_size = 32M
upload_max_filesize = 32M
3 database configuration (mysql/mariadb)
If there is no "my.cnf" file you can create it
(for Synology NAS) path is /var/packages/MariaDB/etc/my.cnf
and add below lines to the file
-------
[mysqld]
max_allowed_packet = 1073741824
---------
You will need admin privilege to create or modify file. modify file useing $sudo -i vim my.cnf file
Check below link if you need it for Synology
https://www.synology.com/en-sg/knowledg ... nology_NAS
Hope it helps to any one.
Re: 32MB file uploads - how?
Hi,
I am very new in this technical thing.
Is there anyone help me how can I increase file upload limit?
thanks.
I am very new in this technical thing.
Is there anyone help me how can I increase file upload limit?
thanks.
- Attachments
-
- mantis.info.png (55.04 KiB) Viewed 6476 times
Re: 32MB file uploads - how?
Check your PHP settings, see here:
https://stackoverflow.com/questions/218 ... -file-size
In Mantis add code below to core\config_inc.php and change value to your liking but ensure that the PHP settings support this also:
https://stackoverflow.com/questions/218 ... -file-size
In Mantis add code below to core\config_inc.php and change value to your liking but ensure that the PHP settings support this also:
Code: Select all
/**
* Maximum file size (bytes) that can be uploaded.
* Also check your PHP settings (default is usually 2MBs)
* @global integer $g_max_file_size
*/
$g_max_file_size = 5000000;