提问前请务必仔细阅读如何排查故障和常见问题。
问题描述:
无法上传头像
版本:beta-14
报错内容:
POST https://www.hicode.icu/api/users/1/avatar
Intervention\Image\Exception\MissingDependencyException: PHP Fileinfo extension must be installed/enabled to use Intervention Image. in /www/wwwroot/hicode/vendor/intervention/image/src/Intervention/Image/ImageManager.php:137
Stack trace:
#0 /www/wwwroot/hicode/vendor/intervention/image/src/Intervention/Image/ImageManager.php(27): Intervention\Image\ImageManager->checkRequirements()
#1 /www/wwwroot/hicode/vendor/flarum/core/src/User/Command/UploadAvatarHandler.php(71): Intervention\Image\ImageManager->__construct()
#2 /www/wwwroot/hicode/vendor/illuminate/bus/Dispatcher.php(90): Flarum\User\Command\UploadAvatarHandler->handle()
#3 /www/wwwroot/hicode/vendor/illuminate/pipeline/Pipeline.php(130): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#4 /www/wwwroot/hicode/vendor/illuminate/pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#5 /www/wwwroot/hicode/vendor/illuminate/bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then()
#6 /www/wwwroot/hicode/vendor/illuminate/bus/Dispatcher.php(76): Illuminate\Bus\Dispatcher->dispatchNow()
#7 /www/wwwroot/hicode/vendor/flarum/core/src/Api/Controller/UploadAvatarController.php(49): Illuminate\Bus\Dispatcher->dispatch()
#8 /www/wwwroot/hicode/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(96): Flarum\Api\Controller\UploadAvatarController->data()
#9 /www/wwwroot/hicode/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractSerializeController->handle()
#10 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#11 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\DispatchRoute->process()
#12 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle()
#13 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process()
#14 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(45): Laminas\Stratigility\Next->handle()
#15 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process()
#16 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle()
#17 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#18 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle()
#19 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process()
#20 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Laminas\Stratigility\Next->handle()
#21 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process()
#22 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#23 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process()
#24 /www/wwwroot/hicode/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#25 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process()
#26 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#27 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process()
#28 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#29 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process()
#30 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#31 /www/wwwroot/hicode/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#32 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process()
#33 /www/wwwroot/hicode/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Laminas\Stratigility\Next->handle()
#34 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process()
#35 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle()
#36 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process()
#37 /www/wwwroot/hicode/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\Stratigility\Next->handle()
#38 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process()
#39 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#40 /www/wwwroot/hicode/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process()
#41 /www/wwwroot/hicode/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#42 /www/wwwroot/hicode/vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#43 /www/wwwroot/hicode/public/index.php(26): Flarum\Http\Server->listen()
#44 {main}
调试模式报错内容:
已尝试的解决办法:
无