Change Upload Max Size Label on View.php

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
warde06

Change Upload Max Size Label on View.php

Post by warde06 » Jun 16, 2005 9:00 am

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?

warde06

Post by warde06 » Jun 16, 2005 9:06 am

The version is 1.0.0a2.

thraxisp
Developer
Posts: 509
Joined: Feb 13, 2005 10:38 pm
Location: Ottawa, Canada
Contact:

Post by thraxisp » Jun 17, 2005 12:18 pm

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.

warde06

Post by warde06 » Jun 17, 2005 2:53 pm

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

thraxisp
Developer
Posts: 509
Joined: Feb 13, 2005 10:38 pm
Location: Ottawa, Canada
Contact:

Post by thraxisp » Jun 17, 2005 3:53 pm

Have you restarted apache to pick up the changed in the php.ini file?

swati
Posts: 1
Joined: Mar 20, 2014 7:01 am

Re: Change Upload Max Size Label on View.php

Post by swati » Mar 20, 2014 7:11 am

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.

atrol
Site Admin
Posts: 7662
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Change Upload Max Size Label on View.php

Post by atrol » Mar 20, 2014 7:57 am

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
Please use Search before posting and read the Manual

micky
Posts: 1
Joined: May 02, 2014 9:35 am

Re: Change Upload Max Size Label on View.php

Post by micky » May 02, 2014 11:50 am

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

asgharb
Posts: 12
Joined: Aug 15, 2018 1:26 am

Re: Change Upload Max Size Label on View.php

Post by asgharb » Sep 01, 2018 2:52 am

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)) ?

atrol
Site Admin
Posts: 7662
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Change Upload Max Size Label on View.php

Post by atrol » Sep 01, 2018 4:14 am

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
Please use Search before posting and read the Manual

Post Reply