How to enable mbstring in cpanel without easyapache - cpanel

How to enable mbstring in cpanel for PHP 7
without ssh access.
I need an alternative solution to enable mbstring

There are two packages, that provide the mbstring extension for php:
php7.1-mbstring
php-mbstring
Install one of them with the package manager from your distribution (e.g. apt install [package]).

Related

Centos 8, yum update command not working. given following error. can't find php-common-7.2

I've tried to remove php-common-7.2 but couldn't find where it located.
Problem: package php-pecl-igbinary-3.2.2-1.el8.remi.7.2.x86_64 requires php(api) = 20170718-64, but none of the providers can be installed
- package php-pecl-igbinary-3.2.2-1.el8.remi.7.2.x86_64 requires php(zend-abi) = 20170718-64, but none of the providers can be installed
- cannot install both php-common-7.2.34-3.el8.remi.x86_64 and php-common-7.4.16-1.el8.remi.x86_64
- cannot install both php-common-7.2.34-4.el8.remi.x86_64 and php-common-7.4.16-1.el8.remi.x86_64
- cannot install the best update candidate for package php-pecl-igbinary-3.2.1-1.el8.remi.7.4.x86_64
- problem with installed package php-common-7.4.16-1.el8.remi.x86_64
- package php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64 is filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
My server configuration is
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
Apache Web Server
php7.4-cli
using Webmin & virtaulmin`
You are trying to install igbinary extension for PHP 7.2 with PHP 7.4. This cannot work.
For a proper configuration, please follow the Wizard instructions
And not enough information for more help:
rpm -qa php\*
dnf repolist
dnf module list PHP

Upgrade Apache 2.4.6 to 2.4.27 without losing config

I wan to updage my currently active apache v2.4.6 to latest ver 2.4.27. (CentOS 7)
I know how to install from stracth but I just want to upgrade the version with my configurations remain stil.
Would it be okay to remove whole httpd content with /etc/httpd, /run/httpd, and /usr/lib64/httpdwith takin configuration backup, then install 2.4.27 from scratch and paste the old config files?
Thank you in advance for any guidance
You can backup everything and add CodeIT rpm repo:
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el7.repo
yum install -y epel-release
yum upgrade httpd
Please also be sure to merge your SSL configuration and mpm defaults to have new features like HTTP/2 protocol support enabled.

How install Intl, GMP and BCMath PHP extensions?

Centos 6.8 Final
Php 7.0.16
Directadmin control panel
yum install php-gmp
yum install php-bcmath
yum install php-intl
result is: No package xxx available.
Thank you.
BCmath is already preinstalled with PHP. http://php.net/manual/en/bc.requirements.php
For other libs try to define repository where yum would search artifacts and then install the extension. For example,
yum --enablerepo=remi install php-intl
Another alter way is described there https://webtatic.com/packages/php70/
Take a look at the php70w-common package which includes gmp, and further just install php70w-bcmath and php70w-intl. Don't forget to enable all packages inside php.ini.

how install pdo-mysql in centos7

I install laravel 5 and then install packages neede.
I install php-pdo and some other but now i cant install pdo-mysql and laravel return error.
PDOException in PDOConnection.php line 47: could not find driver
I am use Centos 7 and PHP 5-6-29.
Check which package is installed (which provider) and provides the stack, then use the same namespace.
Webtatic uses php56w-*
IUS uses php56u-*
remi-safe (SCL packages) use php56-php-*
remi-php56 simply use php-*
other providers can use something else
As you need pdo_mysql driver, simply
yum install <namespace>-pdo_mysql
(using the ext name, yum will find the correct package name which provides this ext).
Also check you don't have any "exclude" lines in the yum configuration (such as the ones provided in altered cpanel distributions)
Try using this
yum install php-mysql
systemctl restart httpd
You can search package like
yum search php
Pick the ones you need and install them like this:
yum -y install php-mysqlnd php-pdo
In the next step I will install some common PHP modules that are required by CMS Systems like Wordpress, Joomla, and Drupal:
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel
https://webtatic.com/packages/php56/
I believe the driver is php56w-mysql so yum install php56w-mysql should do the job.

Remove phpmyadmin from Centos7

I did a general yum install command on my Centos7 server, and got phpmyadmin 4.4 - I want version 4.6
How do I cleanly remove phpmyadmin version 4.4 before installing the new version? I am running php7, and the phpmyadmin 4.4 added many php5.4 files, some of which conflict with my php installation.
Remove phpmyadmin:
yum remove phpmyadmin
Be aware:
It will not delete the /etc/httpd/conf.d/phpMyAdmin.conf file but it will change it to phpMyAdmin.conf.rpmsave
Same for /etc/phpMyAdmin/config.inc.php.rpmsave
I you are using centos 7 I believe you are using apache web server Apache/2.4.6 (CentOS). I usually provision centos with the epel repositories.
the version that is installed by default (using the terminal is 4.4.15)
when you install phpmyadmin using terminal it creates a file in /etc/httpd/conf.d/phpMyAdmin.conf
If you take a closer look to this file it has the php configuration where the phpmyadmin files are located in the server. (/usr/share/phpMyAdmin).
Phpmyadmin configuration
this are possible solutions:
1) download the version that you would like to have (phpMyadmin 4.6) and download it to the root of the web folder (var/www/html/phpMyAdmin) restart the server and you will be able to access phpmyadmin directly
2) you can download the php source from phpmyadmin official page to this folder /usr/share/phpMyadmin4.6
2.1) edit the configuration file to point to 4.6 php myadmin /etc/httpd/conf.d/phpMyAdmin.conf.
2.2) restar the server and try http://ip-to-server/phpMyAdmin
Hope it helps
There are two ways to delete phpMyadmin
yum remove phpMyAdmin.noarch
remove phpMyAdmin
Or
rpm -qa |grep phpMyAdmin
rpm -e rpm -e phpMyAdmin-4.4.15.10-2.el7.noarch
Remove phpMyAdmin with rpm