陆零云
21
0
商品图支持 webp 之后,缩略图任务每天失败两百多张。错误是 imagecreatefromwebp(): WebP support is not compiled in,路径没错,文件也在。
第一反应是用户传了假 webp。file 命令看头部是 RIFF 加 WEBP,identify 也能识别,文件没问题。php -i 里 grep webp 没有任何输出,php -m 看 GD 是在的。
这台机器的 PHP 8.3 是 docker-php-ex...
陆零云
25
0
用户传了一张全景图,前台提示上传成功,后台生成缩略图时 500。error_log 里是 Allowed memory size of 268435456 bytes exhausted,位置在 imagecreatefromjpeg。
第一反应是 memory_limit 太小,从 256M 调到 512M,重启后同一张图还是挂,只是报错数字变成 536870912。图是 8000x6000,真彩色一张就要 8000 乘 6000 乘 4 约 192MB...