Page 1 of 1

Change Upload Max Size Label on View.php

Posted: 16 Jun 2005, 14:00
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: 16 Jun 2005, 14:06
by warde06
The version is 1.0.0a2.

Posted: 17 Jun 2005, 17:18
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: 17 Jun 2005, 19:53
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: 17 Jun 2005, 20:53
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: 20 Mar 2014, 12:11
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: 20 Mar 2014, 12:57
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: 02 May 2014, 16:50
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: 01 Sep 2018, 07:52
by asgharb
micky wrote: 02 May 2014, 16:50 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: 01 Sep 2018, 09:14
by atrol
asgharb wrote: 01 Sep 2018, 07:52 where is ((max_allowed_packet)) ?
atrol wrote: 20 Mar 2014, 12:57 Check database setting max_allowed_packet in my.cnf
https://stackoverflow.com/questions/248 ... f-location