View Issue Details

IDProjectCategoryView StatusLast Update
0028384mantisbtbugtrackerpublic2021-05-12 09:34
Reportercbrambilla Assigned Todregad  
Status closedResolutionno change required 
Product Version2.25.0 
Summary0028384: Can't upload file

I cannot upload any file on any issue. The result is always a page with the "INTERNAL APPLICATION ERROR" (without any any error number) and nothing else.
The fileinfo extension is enabled and all is working well except attach file.
I tryed both DATABASE and DISK options but the result is the same.

MantisBT 2.25.0
PHP 8.0.0
Windows server 2019 64bit
IIS 10

Attached screen from admin/check/index.php and PHP error log.

TagsNo tags attached.




2021-04-29 04:42


image.png (44,015 bytes)   
image.png (44,015 bytes)   
image-2.png (55,763 bytes)   
image-2.png (55,763 bytes)   
PHP80x64_errors.log (670 bytes)   
[29-Apr-2021 10:21:56 Europe/Rome] finfo::__construct(): string modifier `B' invalid
C:\inetpub\wwwroot\mantisbt\core\file_api.php: 1150: finfo - -> - __construct()
C:\inetpub\wwwroot\mantisbt\core\file_api.php: 1169: - - - - file_create_finfo()
C:\inetpub\wwwroot\mantisbt\core\file_api.php: 850: - - - - file_get_mime_type()
C:\inetpub\wwwroot\mantisbt\core\file_api.php: 76: - - - - file_add()
C:\inetpub\wwwroot\mantisbt\core\commands\IssueNoteAddCommand.php: 255: - - - - file_attach_files()
C:\inetpub\wwwroot\mantisbt\core\commands\Command.php: 137: IssueNoteAddCommand - -> - process()
C:\inetpub\wwwroot\mantisbt\bugnote_add.php: 64: Command - -> - execute()

PHP80x64_errors.log (670 bytes)   


2021-04-29 11:20

developer   ~0065452

I can't reproduce this.

Are you using a custom magic DB? If so, do you get the same error with the default one ($g_fileinfo_magic_db_file = '';) ?

Check if you get the same error also when running a simple script like <?php new finfo( FILEINFO_MIME );. If that's the case, then the problem is definitely not caused by MantisBT and you should figure out what is wrong with your PHP setup.



2021-04-30 11:20

reporter   ~0065464

As you told the problem was in PHP and particulary the magic DB.
I cannot get PHP working with magic DB at all.
So I removed it and now, with the default one, it is working well!



2021-04-30 11:45

developer   ~0065465

Thanks for the feedback.