gpt4 book ai didi

PHP 看不到 bcmath

转载 作者:行者123 更新时间:2023-12-04 19:42:22 30 4
gpt4 key购买 nike

我在服务器上有两个版本的 PHP(Centos 6.8) - 5.6 和 7.1
我的 Nginx 使用 php7.1,它不是默认的 PHP 解释器。
经过一番与 yum 的斗争后,我安装了 php71-php-bcmath。 Yum 默认没有启用它,所以我做了一个符号链接(symbolic link)

ln -s /opt/php71/etc/mods-available/bcmath.ini /opt/php71/etc/php.d/bcmath.ini
/opt/php71/bin/php-config --extension-dir表明扩展路径是
/opt/php71/lib/php/modules

有 bcmath.so
/opt/php71/bin/php -i | grep bcmath

表明 php 与标志 '--enable-bcmath=shared' 一起配置

但是当我尝试使用 bcmath 中的函数时 - 出现错误
Call to undefined function PhpAmqpLib\Wire\bcadd() 

我已经让 nginx 和 php-fpm 重启了一千次,我该如何启用这个邪恶的扩展?

最佳答案

我一直在重新启动错误的 php-fpm,在我的情况下是 php-fpm71

关于PHP 看不到 bcmath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52159477/

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