Cannot upload file to Database

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mcclt
Posts: 2
Joined: 12 Jun 2019, 07:09

Cannot upload file to Database

Post by mcclt »

I installed MantisBT 2.21.1. (MySQL Server 5.7, PHP 5.6.30)

PHP.ini:

Code: Select all

memory_limit = 200M
	post_max_size = 200M
	upload_max_filesize = 200M
my.ini

Code: Select all

wait_timeout = 6000
max_connections=1000
max_allowed_packet=200M
config_inc.php

Code: Select all

$g_allow_file_upload	= ON;
$g_file_upload_method	= DATABASE;
$g_max_file_size		= 6000000;	# in bytes
$g_preview_attachments_inline_max_size = 256 * 1024;
I tried to upload several files:

1. test.pptx, size =3,648,672 bytes --> SUCCESS
2. npp.7.7.Installer.exe, size = 3,680,712 bytes --> SUCCESS
3. test.mp4 size=4,456,962 bytes ---> FAILED
4. A binary file, size = 3,649,536 bytes ---> FAILED

The 4th is smaller than the 2nd one and g_max_file_size but FAILED.

But when I switch to save on DISK, all above operations are SUCCESSFUL
Post Reply