• 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)

This Article Has Been Shared 263 Times!

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

  • Adding Schema.org Structured Data in Genesis Theme

    Adding Schema.org Structured Data in Genesis Theme without using any plugin is quite easy as Genesis has great documentation and has excellent existing markups.

  • WordPress REST API and OAuth : Complete Setup Guide

    Here is Complete Setup Guide to WordPress REST API and OAuth Including Technical Details, Example Clients and API Tools Resources For Anyone.

  • Showing Open Graph Protocol og image, og description Properly

    Showing Open Graph Protocol og image, og description properly can be a challenge – either proper post specific og image is not shown or description is chopped.

  • Podcast and WordPress : Tips

    Podcast and WordPress can make the older posts more lively again. A small introduction Podcast can increase the conversion. Here is a detailed guide.

  • Post Specific Widget with Semantic Markup for WordPress

    Post specific widget with Semantic Markup for WordPress is a kind of template Plugin for more flexibility. You can create infobox like Wikipedia.

Additionally, 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

  • What is an Automatic Ethanol Fireplace February 8, 2023
  • Disadvantages of Cloud-Native Computing February 7, 2023
  • Projector Screen Basics February 6, 2023
  • What is Configuration Management February 5, 2023
  • What is ChatGPT? February 3, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Fix : PHP bcmath Extension Missing Ubuntu 16.04," in The Customize Windows, May 15, 2017, February 9, 2023, https://thecustomizewindows.com/2017/05/fix-php-bcmath-extension-missing-ubuntu-16-04/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT