致命错误:未捕获错误:调用未定义的函数bcadd()

时间:2018-06-29 04:14:44

标签: php nginx bcmath

在安装“ eduTrac SIS”并访问“仪表板”后出现此错误

Ubuntu 16.4,PHP 7.0(php7.0-fpm),Apache2,Nginx,

URL显示错误500和nginx / error.log显示,

  

在stderr中发送的FastCGI:“ PHP消息:PHP致命错误:未捕获   错误:调用未定义函数PHPBenchmark \ bcadd()   /var/www/html/eduTrac-SIS/app/src/vendor/phpbenchmark/phpbenchmark/lib/PHPBenchmark/Utils.php:18

2 个答案:

答案 0 :(得分:11)

PHP无法识别“ bcadd()”给出的错误。 “ bcadath” PHP扩展中包含“ bcadd()”函数。

只需安装相关的bcmath扩展程序即可解决此问题。

sudo apt-get install php7.0-bcmath

请注意,您应该根据您的PHP版本找到正确的bcmath扩展版本。 并重新启动apache

sudo service apache2 restart

答案 1 :(得分:1)

对于PHP 7.4- bcmath,使用apt或yum进行安装,如下所示:

sudo apt install php7.4-bcmath

sudo yum install php7.4-bcmath
相关问题