Jiří Doubravský Asked: 2016-05-23 22:55:05 +0800 CST2016-05-23 22:55:05 +0800 CST 2016-05-23 22:55:05 +0800 CST How do I enable the bcdiv function in PHP 7.0? 772 The PHP function bcdiv is not available by default. How do I enable that in PHP configuration? php 3 Answers Voted Jiří Doubravský 2016-05-23T23:00:20+08:002016-05-23T23:00:20+08:00 Install module bcmath sudo apt-get install php-bcmath (note: on ubuntu 16.04^ with PHP 7.0^ use php7.0-bcmath package instead) Restart apache service eventually sudo service apache2 restart Kenny 2017-04-03T18:43:35+08:002017-04-03T18:43:35+08:00 Install module bcmath in PHP 7.0, you should try: sudo apt-get install php7.0-bcmath And restart php engine or apache Scofield 2020-06-06T10:34:58+08:002020-06-06T10:34:58+08:00 If you're using Docker, then you can install it using docker-php-ext-install: # Dockerfile FROM php:7.4-fpm-alpine RUN docker-php-ext-install bcmath
Install module bcmath
(note: on ubuntu 16.04^ with PHP 7.0^ use php7.0-bcmath package instead)
Restart apache service eventually
Install module bcmath in PHP 7.0, you should try:
And restart php engine or apache
If you're using Docker, then you can install it using
docker-php-ext-install
: