Page 1 of 1

Change Upload Max Size Label on View.php

Posted: Jun 16, 2005 9:00 am
by warde06
I have increased the max file size that can be uploaded and I would like to update the label on view.php where it says:

Upload File
Select File
(Max Size: 2000k)

Any suggestions on how to do this?

Posted: Jun 16, 2005 9:06 am
by warde06
The version is 1.0.0a2.

Posted: Jun 17, 2005 12:18 pm
by thraxisp
The label there is the minimum of three parameters that control the size of the upload. You may need to change all of them to actually increase the upload size. See http://www.futureware.biz/blog/index.ph ... &tb=1&pb=1 for more details.

Posted: Jun 17, 2005 2:53 pm
by warde06
I believe that I have changed all of those. My settings are below, but when I view the bug it still says (Max Size: 2000k) and of course that is the max that I can upload. I have read through the manual and forums regarding this, but I am still missing something. Your help is greatly appreciated!

In /etc/php.ini I have changed the following:
; Maximum size of POST data that PHP will accept.
post_max_size = 50M

; Maximum allowed size for uploaded files.
upload_max_filesize = 50M

; Resource Limits ;
max_execution_time = 120
max_input_time = 120
memory_limit = 32M

In config_inc.php I have changed the following:
# See also: $g_upload_project_file_threshold, $g_upload_bug_file_threshold,
# $g_allow_reporter_upload
$g_allow_file_upload = ON;

# Upload destination: specify actual location in project settings
# DISK, DATABASE, or FTP.
$g_file_upload_method = DISK;

# Maximum file size that can be uploaded
# Also check your PHP settings (default is usually 2MBs)
$g_max_file_size = 50000000; # 50 MB

Posted: Jun 17, 2005 3:53 pm
by thraxisp
Have you restarted apache to pick up the changed in the php.ini file?

Re: Change Upload Max Size Label on View.php

Posted: Mar 20, 2014 7:11 am
by swati
I have done all the necessary changes required to increase file size in mantis bt

changed the php.inc file
upload_max_filesize=2M;
to
upload_max_filesize=4M;
Maximum size of POST data that PHP will accept.
post_max_size = 50M

; Maximum allowed size for uploaded files.
upload_max_filesize = 50M

; Resource Limits ;
max_execution_time = 120
max_input_time = 120
memory_limit = 32M

In config_inc.php I have changed the following:
# See also: $g_upload_project_file_threshold, $g_upload_bug_file_threshold,
# $g_allow_reporter_upload
$g_allow_file_upload = ON;

then restarted the xampp and the try uploading 2.5 mb file getting error

Database query failed. Error received from database was #2006: MySQL server has gone away for the query: INSERT INTO mantis_bug_file_table
( bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content, user_id )
VALUES
( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ).


please help me out.

Re: Change Upload Max Size Label on View.php

Posted: Mar 20, 2014 7:57 am
by atrol
Check database setting max_allowed_packet in my.cnf

You might also consider to store attachments on disk instead of storing them on database.
See $g_file_upload_method at http://www.mantisbt.org/docs/master-1.2 ... IG.UPLOADS

Re: Change Upload Max Size Label on View.php

Posted: May 02, 2014 11:50 am
by micky
I have changes the max_allowed_packet parameter from 25M to 50M and now I can load files without the error reported.
Version of mantis that I have installed is 1.2.17

Re: Change Upload Max Size Label on View.php

Posted: Sep 01, 2018 2:52 am
by asgharb
micky wrote:
May 02, 2014 11:50 am
I have changes the max_allowed_packet from 25M to 50M and now I can load files without the error reported.
Version of mantis that I have installed is 1.2.17
where is ((max_allowed_packet)) ?

Re: Change Upload Max Size Label on View.php

Posted: Sep 01, 2018 4:14 am
by atrol
asgharb wrote:
Sep 01, 2018 2:52 am
where is ((max_allowed_packet)) ?
atrol wrote:
Mar 20, 2014 7:57 am
Check database setting max_allowed_packet in my.cnf
https://stackoverflow.com/questions/248 ... f-location