Cant upload attachments - internal application error

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
mates215
Posts: 13
Joined: 04 Sep 2015, 10:15

Cant upload attachments - internal application error

Post 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'
);
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Cant upload attachments - internal application error

Post 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.
Please use Search before posting and read the Manual
mates215
Posts: 13
Joined: 04 Sep 2015, 10:15

Re: Cant upload attachments - internal application error

Post 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
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Cant upload attachments - internal application error

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