• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Fix : PHP bcmath Extension Missing Ubuntu 16.04

By Abhishek Ghosh May 15, 2017 4:25 pm Updated on May 15, 2017

Fix : PHP bcmath Extension Missing Ubuntu 16.04

Advertisement

Previously we talked about one indispensable plugin WP Statistics. WordPress WP statistics like plugins use the module with GEO IP and infamously through errors rendering plugin’s many functions limited. Here is how to fix PHP bcmath extension missing on Ubuntu 16.04, Nginx running PHP 7.0 or PHP 7.1. Ofcouse one can follow this guide to fix PHP bcmath extension missing Ubuntu 16.04 for any type of web softwares.

 

Fix : PHP bcmath Extension Missing Ubuntu 16.04 : Stepwise Troubleshoot

 

If you have upgraded from old Nginx and PHP, then you must check which version of PHP you are actually using. If we run php -v command we will get this kind of output :

 

Vim
1
2
3
4
5
root@server:/home/user# php -v
PHP 7.1.5-1+deb.sury.org~xenial+1 (cli) (built: May 11 2017 14:07:52) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.5-1+deb.sury.org~xenial+1, Copyright (c) 1999-2017, by Zend Technologies

 

The above output is saying that maximum version of PHP the system can use is 7.1.5. It does not mean really it is using PHP 7.0. That way deliberately set by the repo maintainer for backward compatibility. If you change directory to /etc/php/ and do and ls, you’ll see all the versions :

Advertisement

---

Vim
1
2
3
root@server:/home/user# cd /etc/php/
root@server:/etc/php# ls
5.5  5.6  7.0  7.1

From Nginx, actually you can use any of the version of PHP.

Secondly, you should check which repo you are using by looking at these files and directories :

Vim
1
2
3
4
5
cat /etc/apt/sources.list
cd /etc/apt
ls
cd sources.list.d
ls

In our case, the ls output is :

Vim
1
2
goaccess.list                         ondrej-ubuntu-php-xenial.list
nginx-ubuntu-development-xenial.list  percona.list

We wanted to see whether ondrej-ubuntu-php-xenial.list is present or not. In case you do not that PPA in your system, simply run these commands :

Vim
1
2
3
apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:ondrej/php
apt update

Now, if you go to /etc/nginx/sites-available directory and open Nginx “virtual hosts” file, search with fastcgi_pass unix:/run/php/php (in case you are using UNIX socket), you will find the entries like :

Vim
1
2
3
4
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;

The above is example that you are using php7.0, not php7.1; although both are available on your system. Now, you have two options :

 

  1. Using PHP 7.1 and install that missing PHP bcmath
  2. Continue using PHP 7.0 and install that missing PHP bcmath

 

We suggest to temporarily continue using PHP 7.0 and install that missing PHP bcmath and later plan to upgrade to PHP 7.1. Because changing version of PHP-FPM with Nginx is not exactly easy smooth work, that needs lot of backup and can have a downtime – expect white pages and troubleshooting.

Simply run :

Vim
1
apt-get install php7.0-bcmath

You are expected to get installation output :

Fix - PHP bcmath Extension Missing Ubuntu 16-04

Vim
1
2
3
4
5
6
7
8
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
php7.0-bcmath
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.6 kB of archives.
After this operation, 64.5 kB of additional disk space will be used.

Continue it and restart the services :

Vim
1
2
3
service php7.0-fpm restart
service nginx restart
service mysql restart

Alternatively, in case you want to use PHP 7.1 and install that missing PHP bcmath then run :

Vim
1
apt-get install php7.1-bcmath

and restart the services :

Vim
1
2
3
service php7.0-fpm restart
service nginx restart
service mysql restart

Check your web application, it should be working now. There is no more extra settings, PHP bcmath enabled while compilation for the above PPA. If you still can not make PHP bcmath active, you have some other problem and you should have a basic checking of the log files.

Tagged With php bcmath extension , the requested PHP extension bcmath is missing , php bcmath sur wordpress , PHP bcmath extension missing (PHP configuration parameter --enable-bcmath) , PHP bcmath extension missing , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1882 w9SycZw1f_L8z_eYuZa7Ffp8-Br0vOlrIYAqWHTD4Lc7XFJAx7agbUk40v6dxUx5 8bd81832be97522904f35502b94ecad020713ce0&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1835 g5A0l3MMQplU0sXebZZqPOhDQKJCK6nr0c0x-G9FTDYQpvkJeXStnhxyEKBrbLm9 dc09943a880e70babf790ef7b82c339bc10152c9&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1827 M9Ud68f8vuhofWzKcSZNQJUSU9jP8D2TO8Cah8iU8G_nRJ3Y-pJNsOJ1RQZs423Q 72d6c3e5f4ad775c303ce083f35a572e75118272&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1827 Bhfh68sahsqg4orlO7a0oWi5eQah0VxmciN3BovYuMTgRrHph38W5P-vU9zGcswR aa34e29c2cf69c24885ea98346d771a4afc7e762&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , Отсутствует расширение PHP bcmath (параметр конфигурации PHP --enable-bcmath)
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Fix : PHP bcmath Extension Missing Ubuntu 16.04

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • How to Install WordPress : Ubuntu 16.04, Nginx, PHP7-FPM

    Here is Step by Step Guide on How to Install WordPress on Ubuntu 16.04, Nginx, PHP7-FPM, memcached & Percona MySQL 5.7 on Cloud Server or VPS.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • Ansible Ubuntu 16.04 1 Click Install WordPress, Nginx Playbook Tutorial

    Following This Tutorial, You Will Be Able to Create Own Ansible 1 Click Install WordPress Nginx Percona MySQL Playbook For Ubuntu 16.04.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy