Tuesday, October 11, 2016

PHP Fatal error: Call to undefined function bccomp() - Ondřej PHP PPA

I am using PPA from Ondřej for my PHP project, seem the default installation does't came with bcmath library.
Stack trace:
1. {main}() /var/www/html/ayam.com/hi.php:0
Fatal error:  Call to undefined function bccomp() in /var/www/html/ayam.com/hi.php

Fix it by enter this command :
$ sudo apt install php5.6-bcmath
$ sudo apt install php7.0-bcmath
$ sudo apt install php-bcmath
Ref : http://askubuntu.com/questions/416866/how-can-i-get-the-bcmath-plugin-in-php5-in-ubuntu

No comments:

Post a Comment