gpt4 book ai didi

Ubuntu "GD Library extension not available with this PHP installation.' 上的 Laravel 5.7 '

转载 作者:行者123 更新时间:2023-12-04 18:37:36 30 4
gpt4 key购买 nike

我正在尝试使用 dropzone 上传图片,但出现此错误

GD Library extension not available with this PHP installation

Ubuntu 18 上的 PHP 版本是 7.2.10,所以我在找到这个答案后尝试安装 gd 库 Stackoverflow answer to a similar issue所以我执行了
sudo apt-get install php7.2-gd
php -i | grep -i gd

结果是
/etc/php/7.2/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD headers Version => 2.2.5
GD library Version => 2.2.5
gd.jpeg_ignore_warning => 1 => 1
GDMSESSION => ubuntu
XAUTHORITY => /run/user/1000/gdm/Xauthority
$_SERVER['GDMSESSION'] => ubuntu
$_SERVER['XAUTHORITY'] => /run/user/1000/gdm/Xauthority

我重新启动了 Apache 并尝试再次上传,但我仍然收到相同的错误,并且该答案对我不起作用

最佳答案

如果从 php artisan serve 为您的应用程序提供服务请注意以下事项:

即使重新启动您的 apache 服务器也无所谓,因为您仍在运行 php 的内部服务器。

你必须停止php artisan serve并再次启动它以加载您已安装的新扩展。

如果您不这样做,php 服务器仍将使用不知道新安装的 GD 库的旧设置。

编辑:

另外,运行 PHPinfo()找出您正在使用的 php.ini 文件。搜索显示以下内容的行:Loaded Configuration File

关于Ubuntu "GD Library extension not available with this PHP installation.' 上的 Laravel 5.7 ',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52680336/

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