Wednesday, February 5, 2020

Magento bccomp Error

[Fri Jan 17 11:51:13.302280 2020] [php7:error] [pid 2430] [client 172.17.0.1:44334] PHP Fatal error:  Uncaught Error: Call to undefined function Magento\\InventorySales\\Model\\IsProductSalableForRequestedQtyCondition\\bccomp() in vendor/magento/module-inventory-sales/Model/IsProductSalableForRequestedQtyCondition/IsSalableWithReservationsCondition.php

Solution :

Install php bcmath package and restart apache.
sudo apt-get install php-bcmath
The solution is for apache installed on Ubuntu. If you have installed php using different command like sudo apt-get install php7.0 or sudo apt-get install php7.2 or sudo apt-get install php5.6, you need to install the package using similar method i.e. sudo apt-get install php7.0-bcmath or sudo apt-get install php7.2-bcmath or sudo apt-get install php5.6-bcmath etc.

No comments:

Post a Comment