RuntimeException: The bcmath extension is required by NumberFormatter - drupal

I have installed drupal commerce module. I am getting the below error while viewing a product page.
RuntimeException: The bcmath extension is required by NumberFormatter. in CommerceGuys\Intl\Formatter\NumberFormatter->__construct() (line 113 of /home/web/docroot/vendor/commerceguys/intl/src/Formatter/NumberFormatter.php).

You have bcmath error and you need to install PHP bcmath extension.
sudo apt install php7.2-bcmath
You can check enabled extensions with php function. get_loaded_extensions()

Install php-bcmath with dependencies
yum install php-bcmath

Based on your PHP version you have to install bcmath extension.
for 7.2
sudo apt install php7.2-bcmath
for 7.4
sudo apt install php7.2-bcmath
Once done with installation you have to restart apache server then only it will start.
sudo service apache2 restart

Related

php7.0-mcrypt can't install on ubuntu14.04

phpmyadmin show error [ The mcrypt extension is missing. Please check your PHP configuration.] on nginx. My PHP version is PHP 7.0.33-1+ubuntu14.04.1+deb.sury.org+1 (cli).
When I install php7.0-mcrypt, package doesn't exist.How to install php7.0-mcrypt?
As I understand from your message, you're using ubuntu 14.04. I recommend you upgrade your system. You could find this package in some latest reseases.
Or you could install this package manually wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/p/php7.0/php7.0-mcrypt_7.0.33-0ubuntu0.16.04.4_amd64.deb && sudo dpkg -i php7.0-mcrypt_7.0.33-0ubuntu0.16.04.4_amd64.deb. But be careful, you could face some dependency hell and damage your OS.

Apache installation with mod_fcgi for httpd24 centos 6.9

I have installed php and apache in my centos 6.9 for apache version 2.4 and php version 5.6 as below:
yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum install epel-release
yum repolist
yum --enablerepo=extras install centos-release-scl
yum install httpd24
yum install -y libapache2-mod-fastcgi rh-php56-fpm rh-php56 rh-php56-php rh-php56 rh-php56-cli
but I can't see mod_fcgi.so is in /opt/rh/httpd24/root/etc/httpd/modules directory.
Hence I downloaded the mod_fcgi from http://httpd.apache.org/download.cgi#mod_fcgid.
Need an way so that I can install it existing apache modules
Many thanks in advance
Using httpd24 from Software Collection, you already have mod_proxy_fcgi, other old modules are deprecated.
I recommend you to read PHP Configuration Tips about such configuration (notice, this was written for CentOS 7 but works on CentOS 6 using httpd24)

How to install PHP 7.1 on EC2 running on Amazon Linux AMI 2018.03 having nginx as web server?

How to install PHP 7.1 on Amazon EC2 t2.micro Instance running Amazon Linux AMI 2018.03 having nginx as web server?
Reference to PHP7
With reference to this answer, change Step 1 to the following:
1. Install Apache 2.4 and PHP 7.1 on Amazon Linux AMI
# Remove current apache & php
sudo yum remove httpd* php*
# Install Apache 2.4
sudo yum install httpd24
# Install PHP 7.1
sudo yum install php71
# Install additional commonly used php packages
sudo yum install php71-gd
sudo yum install php71-imap
sudo yum install php71-mbstring
sudo yum install php71-mysqlnd
sudo yum install php71-opcache
sudo yum install php71-pdo
sudo yum install php71-pecl-apcu
Basically replacing php70 with php71.
Continue with step 2 and the rest as per the original tutorial.
I followed below steps to install PHP7.1 which had already Nginx as web server for Amazon Linux AMI 2018.03
#Remove Old PHP
yum remove php*
#Update Reposistory
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
#Update Amazon AMI
yum upgrade -y
#Install PHP
#List of PHP packages https://webtatic.com/packages/php71/
yum install php71w php71w-cli php71w-fpm
yum install php71w-mysql php71w-xml php71w-curl
yum install php71w-opcache php71w-pdo php71w-gd
yum install php71w-pecl-apcu php71w-mbstring php71w-imap
yum install php71w-pecl-redis php71w-mcrypt
#change listen mode to CGI
sed -i 's/127.0.0.1:9000/\/tmp\/php5-fpm.sock/g' /etc/php-fpm.d/www.conf
/etc/init.d/php-fpm restart
touch /tmp/php5-fpm.sock
chmod 777 /tmp/php5-fpm.sock
service nginx restart
The reason I am still using /tmp/php5-fpm.sock file so that I do not need to change PHP7 sock file in all website nginx conf and assuming server do not have PHP5 as as on first step it has been removed.
A reliable way to achieve the same output is by following commands on Amazon Linux AMI 2.
# Remove current php & apache
sudo service httpd stop
sudo yum remove httpd* php*
sudo yum install httpd
amazon-linux-extras install php7.1

Symfony 2.8 issue when i run config.php

when i access config.php in my browser i have following issue.
Configuration Checker
This script analyzes your system to check whether is ready to run Symfony applications.
RECOMMENDATIONS
To enhance your Symfony experience, it’s recommended that you fix the following:
intl ICU version installed on your system is outdated (4.2.1) and does not match the ICU data bundled with Symfony (57.1)
To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.
Try to install driver by :
if you use php5 do:
sudo apt-get install php5-intl
if you use php7 :
sudo apt-get install php7.0-intl
After restart apache
sudo /etc/init.d/apache2 restart

Installing SaltStack on RHEL 7?

I need help on installing saltstack on RHEL 7.
RHEL 7 server is from AWS Amazon.
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
I'm getting an error during installation:
$ wget -O - http://bootstrap.saltstack.org | sudo sh
2014-08-04 09:41:45 (932 KB/s) - written to stdout [177548/177548]
INFO: Found function install_red_hat_enterprise_linux_7_stable_deps
INFO: Found function install_red_hat_enterprise_linux_stable
INFO: Found function install_red_hat_enterprise_linux_stable_post
INFO: Found function install_red_hat_enterprise_linux_restart_daemons
INFO: Found function daemons_running
INFO: Running install_red_hat_enterprise_linux_7_stable_deps()
ERROR: Stable version is not available on RHEL 7 Beta/RC. Please set installation type to git.
ERROR: Failed to run install_red_hat_enterprise_linux_7_stable_deps()!!!
Is this version of RHEL 7 not supported for saltstack?
Run the following commands to install from the latest develop branch:
curl -o install_salt.sh -L https://bootstrap.saltstack.com
sudo sh install_salt.sh -M git develop
Remove the -M from the command above if you don't want to install a salt-master and only want to install salt-minion.
I have a similar problem, I tried to install it from epel 7 beta, but there's another problem, see https://bugzilla.redhat.com/show_bug.cgi?id=1127348. Finally I was able to install it by combining pip and yum. I don't have the exact sequence of commands, but sth. like this should work:
yum install --skip-broken salt python-pip
pip install jinja2
I have tried installing SaltStack on CentOS 7 , which should be similar to Redhat 7, and you could try it, hope it works for you:
**[updated]** http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
and then you could
yum install -y salt-master
or
yum install -y install salt-minion
to install it.
You need to enable the rhel-7-server-optional-rpms repo in subscription-manager.

Resources