Windows Server
Wamp installation with the following:
- Apache 2.4.18
- Php 7.0.3
Error:
Intervention\Image\Exception\NotSupportedException: Encoding format (tmp) is not supported.
Why doesn't the avatar upload work?
POST http://private_domain/api/users/1/avatar
{
"errors": [
{
"code": 500,
"title": "Internal server error",
"detail": "Intervention\\Image\\Exception\\NotSupportedException: Encoding format (tmp) is not supported. in C:\\private_location\\vendor\\intervention\\image\\src\\Intervention\\Image\\AbstractEncoder.php:150\nStack trace:\n#0 C:\\private_location\\vendor\\intervention\\image\\src\\Intervention\\Image\\AbstractDriver.php(77): Intervention\\Image\\AbstractEncoder->process(Object(Intervention\\Image\\Image), 'tmp', NULL)\n#1 C:\\private_location\\vendor\\intervention\\image\\src\\Intervention\\Image\\Image.php(119): Intervention\\Image\\AbstractDriver->encode(Object(Intervention\\Image\\Image), 'tmp', NULL)\n#2 C:\\private_location\\vendor\\intervention\\image\\src\\Intervention\\Image\\Image.php(139): Intervention\\Image\\Image->encode('tmp', NULL)\n#3 C:\\private_location\\vendor\\flarum\\core\\src\\Core\\Command\\UploadAvatarHandler.php(99): Intervention\\Image\\Image->save()\n#4 [internal function]: Flarum\\Core\\Command\\UploadAvatarHandler->handle(Object(Flarum\\Core\\Command\\UploadAvatar))\n#5 C:\\private_location\\vendor\\illuminate\\bus\\Dispatcher.php(202): call_user_func(Array, Object(Flarum\\Core\\Command\\UploadAvatar))\n#6 [internal function]: Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(Flarum\\Core\\Command\\UploadAvatar))\n#7 C:\\private_location\\vendor\\illuminate\\pipeline\\Pipeline.php(139): call_user_func(Object(Closure), Object(Flarum\\Core\\Command\\UploadAvatar))\n#8 [internal function]: Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Flarum\\Core\\Command\\UploadAvatar))\n#9 C:\\private_location\\vendor\\illuminate\\pipeline\\Pipeline.php(102): call_user_func(Object(Closure), Object(Flarum\\Core\\Command\\UploadAvatar))\n#10 C:\\private_location\\vendor\\illuminate\\bus\\Dispatcher.php(204): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))\n#11 C:\\private_location\\vendor\\illuminate\\bus\\Dispatcher.php(177): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(Flarum\\Core\\Command\\UploadAvatar), NULL)\n#12 C:\\private_location\\vendor\\flarum\\core\\src\\Api\\Controller\\UploadAvatarController.php(48): Illuminate\\Bus\\Dispatcher->dispatch(Object(Flarum\\Core\\Command\\UploadAvatar))\n#13 C:\\private_location\\vendor\\flarum\\core\\src\\Api\\Controller\\AbstractSerializeController.php(96): Flarum\\Api\\Controller\\UploadAvatarController->data(Object(Zend\\Stratigility\\Http\\Request), Object(Tobscure\\JsonApi\\Document))\n#14 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\GenerateRouteHandlerTrait.php(37): Flarum\\Api\\Controller\\AbstractSerializeController->handle(Object(Zend\\Stratigility\\Http\\Request))\n#15 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\Middleware\\DispatchRoute.php(71): Flarum\\Api\\ApiServiceProvider->Flarum\\Http\\{closure}(Object(Zend\\Stratigility\\Http\\Request), Array)\n#16 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Http\\Middleware\\DispatchRoute->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#17 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#18 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\Middleware\\SetLocale.php(50): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#19 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Http\\Middleware\\SetLocale->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#20 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#21 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\Middleware\\AuthenticateWithHeader.php(57): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#22 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Http\\Middleware\\AuthenticateWithHeader->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#23 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#24 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\Middleware\\AuthenticateWithSession.php(33): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#25 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Http\\Middleware\\AuthenticateWithSession->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#26 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#27 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\Middleware\\RememberFromCookie.php(38): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#28 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Http\\Middleware\\RememberFromCookie->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#29 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#30 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\Middleware\\StartSession.php(33): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#31 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Http\\Middleware\\StartSession->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#32 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#33 C:\\private_location\\vendor\\flarum\\core\\src\\Api\\Middleware\\FakeHttpMethods.php(32): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#34 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Api\\Middleware\\FakeHttpMethods->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#35 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#36 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\Middleware\\ParseJsonBody.php(30): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#37 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Dispatch.php(82): Flarum\\Http\\Middleware\\ParseJsonBody->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#38 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\Next.php(113): Zend\\Stratigility\\Dispatch->__invoke(Object(Zend\\Stratigility\\Route), NULL, Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), Object(Zend\\Stratigility\\Next))\n#39 C:\\private_location\\vendor\\zendframework\\zend-stratigility\\src\\MiddlewarePipe.php(75): Zend\\Stratigility\\Next->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response))\n#40 C:\\private_location\\vendor\\zendframework\\zend-diactoros\\src\\Server.php(166): Zend\\Stratigility\\MiddlewarePipe->__invoke(Object(Zend\\Stratigility\\Http\\Request), Object(Zend\\Stratigility\\Http\\Response), NULL)\n#41 C:\\private_location\\vendor\\flarum\\core\\src\\Http\\AbstractServer.php(38): Zend\\Diactoros\\Server->listen()\n#42 C:\\private_location\\api.php(16): Flarum\\Http\\AbstractServer->listen()\n#43 {main}"
}
]
}