mantis无法上传附件,日志文件XXXX-error_log中显示core/file_api.php: 1023异常,如下
[Fri Feb 15 13:43:55.927268 2019] [proxy_fcgi:error] [pid 32763] [client 192.168.100.10:53203] AH01071: Got error 'PHP message: Class
'finfo' not found
/www/wwwroot/192.168.100.121/mantis/core/file_api.php: 1023: - - - - file_create_finfo()
/www/wwwroot/192.168.100.12
1/mantis/core/file_api.php: 710: - - - - file_get_mime_type( <string>'/tmp/phpito2me' )
/www/wwwroot/192.168.100.121/mantis/core/file_
api.php: 73: - - - - file_add( <integer>5, <array> { ['name'] => 'IPxe8xaexbexe7xbdxae1.png', ['type'] => 'image/png', ['tmp_nam
e'] => '/tmp/phpito2me', ['error'] => 0, ['size'] => 16137, ['browser_upload'] => true }, <string>'bug' )
/www/wwwroot/192.168.100.121
/mantis/core/commands/IssueAddCommand.php: 358: - - - - file_attach_files( <integer>5, <array> { [0] => <array> { ['name'] => 'IPxe8
xaexbexe7xbdxae1.png', ['type'] => 'image/png', ['tmp_name'] => '/tmp/phpito2me', ['error'] => 0, ['size'] => 16137 } } )
/www/ww
wroot/192.168.100.121/mantis/core/commands/Command.php: 137: IssueAddCommand - -> - process()
/www/wwwroot/192.168.100.121/mantis/bug_r
eport.php: 246: Command - -> - execute()
', referer: http://192.168.100.121/mantis/bug_report_page.php
解决:安装PHP的fileinfo扩展后,重新上传文件即可
本人是通过宝塔面板来安装扩展的,如下
如上图即说明安装完毕