How to enable the iconv PHP extension on cPanel?

Elizabeta

Well-Known Member
Mar 21, 2018
221
30
28
Mostar
cPanel Access Level
Root Administrator
Hello,

I have a cPanel&WHM version 86.0.16.
My user install Moodle, and have an error "Moodle requires the iconv PHP extension. Please install or enable the iconv extension."
Can this enabe on cPanel?

Best regards,
Elizabeta
 

Elizabeta

Well-Known Member
Mar 21, 2018
221
30
28
Mostar
cPanel Access Level
Root Administrator
Hello,

I need enable this:


PHP Extensions and libraries

The following PHP extensions are required or recommended (some, e.g. iconv, ctype and tokenizer are now included in PHP by default). Others will need to be installed or selected.


  • The iconv extension is required.
  • The mbstring extension is recommended.
  • The curl extension is required (required for networking and web services).
  • The openssl extension is recommended (required for networking and web services).
  • The tokenizer extension is recommended.
  • The xmlrpc extension is recommended (required for networking and web services).
  • The soap extension is recommended (required for web services).
  • The ctype extension is required.
  • The zip extension is required.
  • The gd extension is recommended (required for manipulating images).
  • The simplexml extension is required.
  • The spl extension is required.
  • The pcre extension is required.
  • The dom extension is required.
  • The xml extension is required.
  • The intl extension is recommended.
  • The json extension is required.
  • The appropriate extension for your chosen database is also required.
Best regards,
Elizabeta
 

Chi.C.J.Rajeeva Lochana

Well-Known Member
May 27, 2019
90
30
18
India
cPanel Access Level
Root Administrator
Twitter
Open Terminal
And then, type
Code:
yum install ea-php73-php-iconv -y
Note that you'd need to replace "php73" with the specific version of PHP you want to install the module for (e.g. php71, php72). Additionally, you also can install this PHP extension by customizing your "Currently Installed Packages" profile, by going to WHM >> Software >> EasyApache 4 if you prefer to use WHM instead of the command line / terminal.
 
Last edited:

Elizabeta

Well-Known Member
Mar 21, 2018
221
30
28
Mostar
cPanel Access Level
Root Administrator
Hello,

I have installed via WHM >> Software >> EasyApache 4 some php extension.
I did not see this php extension in WHM >> Software >> EasyApache 4 ?
The openssl extension is recommended
The tokenizer extension is recommended
The ctype extension is required.
The simplexml extension is required
The spl extension is required.
The pcre extension is required.
The dom extension is required.
The json extension is required.

How can I install them if i can not see via WHM >> Software >> EasyApache 4??

Br,
Elizabeta






 

Elizabeta

Well-Known Member
Mar 21, 2018
221
30
28
Mostar
cPanel Access Level
Root Administrator
Hello,

I have run on terminalcommand to install missing packets:


yum install ea-php72-php-ctype -y
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager, universal-hooks
Package ea-php72-php-common-7.2.28-1.1.3.cpanel.x86_64 already installed and latest version
Nothing to do

I don't know is this packet already installed.

I don't see under php 7.2 installed extension

PHP 7.2

pear

php-cli

php-common

php-curl

php-devel

php-ftp

php-gd

php-iconv

php-intl

php-litespeed

php-mbstring

php-posix

php-soap

php-xml

php-xmlrpc

php-zip

runtime

BR,
Elizabeta
 

Elizabeta

Well-Known Member
Mar 21, 2018
221
30
28
Mostar
cPanel Access Level
Root Administrator
Hello,

I have run this command

ea-php72 -m
[PHP Modules]
Core
ctype
curl
date
dom
filter
ftp
gd
hash
iconv
intl
json
libxml
mbstring
openssl
pcntl
pcre
Phar
posix
readline
Reflection
session
SimpleXML
soap
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

I see all modules, I assume that is ok now, that I have all modules now installed??

BR,
Elizabeta