1.使用tail /var/log/httpd/error_log查看错误为缺少bccomp函数,该函数属于bcmath类
Fatal error: Call to undefined function bccomp()
2.解决方法:
a. 下载php-5.6.40.tar.gz安装包http://hk2.php.net/distributions/php-5.6.40.tar.gz
b. 解压tar -xzvf php-5.6.40.tar.gz
c. 找到对应模块目录cd php-5.6.40/ext/bcmath
./configure --with-php-config=/usr/bin/php-config #以实际路径为准,使用find -name查找
d.依次使用make ;make install编译会得到编译后对应的路径/usr/lib64/php/modules/
e.追加扩展模块echo “extension=bcmath.so”>>/etc/php.ini
f.systemctl restart httpd