Stack Exchange network consists of 178 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
The PHP function bcdiv is not available by default. How do I enable that in PHP configuration?
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
Install module bcmath in PHP 7.0, you should try:
sudo apt-get install php7.0-bcmath
And restart php engine or apache
If you're using Docker, then you can install it using docker-php-ext-install:
RUN docker-php-ext-install bcmath
Required, but never shown