gpt4 book ai didi

php - 高分辨率图像上传失败 stream_copy_to_stream() : read of 8192 bytes

转载 作者:行者123 更新时间:2023-12-02 18:07:07 28 4
gpt4 key购买 nike

我在 docker 容器中使用 laravel + twill 和 php7.4.3-fpm + nginx。当我尝试上传高分辨率图像时,一切正常。如果我上传 3000x3000px 的图像,只要我尝试以更高分辨率(4500x4500px)做同样的事情就没有问题,我收到以下错误,

message: "stream_copy_to_stream(): read of 8192 bytes failed with errno=21 Is a directory"
exception: "ErrorException"
file: "/var/www/backend/vendor/league/flysystem/src/Adapter/Local.php"
line: 159
trace: [{function: "handleError", class: "Illuminate\Foundation\Bootstrap\HandleExceptions", type: "->"},…]
0: {function: "handleError", class: "Illuminate\Foundation\Bootstrap\HandleExceptions", type: "->"}
function: "handleError"
class: "Illuminate\Foundation\Bootstrap\HandleExceptions"
type: "->"
1: {file: "/var/www/backend/vendor/league/flysystem/src/Adapter/Local.php", line: 159,…}
file: "/var/www/backend/vendor/league/flysystem/src/Adapter/Local.php"
line: 159
function: "stream_copy_to_stream"

是 php-fpm 配置问题吗?是php的问题吗?有没有人遇到过类似的问题?

最佳答案

这些步骤为我解决了同样的问题!

  • 打开文件/etc/php/7.*/fpm/php.ini
  • 编辑upload_max_filesize
  • 编辑 post_max_size
  • 重新加载 php7.*-fpm 服务

  • 祝你好运!

    关于php - 高分辨率图像上传失败 stream_copy_to_stream() : read of 8192 bytes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60850870/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com