Page 1 of 1

Cant upload attachments - internal application error

Posted: 30 May 2018, 10:05
by mates215
I would like to ask what iam doing wrong. I cannot upload anything as an attachment. It happens during a creating a bug or a new note in existing bug.
I set a file (for example JPG/PNG etc.). Uploaded file is "undefined" then i confirm it. I have got error message "internal application error"

It runs on windows server 2008 R2, mysql. There is another mantis with similar settings (upload method database etc.) and it works ok. It is older version, version 2.0 though.

My settings in config_inc here:

#################################
# MantisBT File Upload Settings #
#################################

$g_allow_file_upload = ON;
$g_file_upload_method = DATABASE;
$g_dropzone_enabled = ON;
$g_max_file_size = 12000000;
$g_file_upload_max_num = 10;
$g_allowed_files = '';
$g_disallowed_files = '';
$g_absolute_path_default_upload_folder = '';

/**
* Specifies the maximum size (in bytes) below which an attachment is
* previewed in the bug view pages.
* To disable the previewing of attachments, set max size to 0.
* @global integer $g_preview_attachments_inline_max_size
*/
$g_preview_attachments_inline_max_size = 256 * 1024;

/**
* Extensions for text files that can be expanded inline.
* @global array $g_preview_text_extensions
*/
$g_preview_text_extensions = array(
'', 'txt', 'diff', 'patch'
);

/**
* Extensions for images that can be expanded inline.
* @global array $g_preview_image_extensions
*/
$g_preview_image_extensions = array(
'bmp', 'png', 'gif', 'jpg', 'jpeg'
);

Re: Cant upload attachments - internal application error

Posted: 30 May 2018, 10:11
by atrol
Run admin/check/index.php

I assume you will see an error message, telling you that you have to install the PHP fileinfo extension.

Re: Cant upload attachments - internal application error

Posted: 30 May 2018, 10:27
by mates215
I have got some warnings and this fail:


Attachments
Fileinfo extension loaded
Ensure that the fileinfo extension is installed and enabled - result - FAIL

Re: Cant upload attachments - internal application error

Posted: 30 May 2018, 10:32
by atrol
This is exactly what I assumed.
So you have to install/enable the extension to fix it
http://www.php.net/manual/en/fileinfo.installation.php