Moodle requires the iconv php extension. please install or enable the iconv extension.

Moodle requires the iconv PHP extension. Please install or enable the iconv extension.

Moodle version:moodle-latest-36.tgz

ubuntu version:
moodle@moodle:/$ cat /proc/version
Linux version 4.18.0-15-generic (buildd@lgw01-amd64-007) (gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)) #16-UbuntuSMP Thu Feb 7 10:56:39 UTC 2019

php version:
moodle@moodle:/$ php -v
PHP 7.2.15-0ubuntu0.18.10.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.15-0ubuntu0.18.10.1, Copyright (c) 1999-2018, by Zend Technologies

php.ini that there is no iconv extension.

I had to install apt-get 

when installing

moodle@moodle:/$ sudo apt-get install php7.2-iconv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.2-common' instead of 'php7.2-iconv'
php7.2-common is already the newest version (7.2.15-0ubuntu0.18.10.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
moodle@moodle:/$ sudo apt-get install php7.2-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.2-common is already the newest version (7.2.15-0ubuntu0.18.10.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
moodle@moodle:/$

How can I install the iconv extension and enable ?

  • #1

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

  • #2

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

Moodle requires the iconv php extension. please install or enable the iconv extension.

  • #3

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: Mar 24, 2020

  • #4

Hello,

Can user via cpanel interface modify php.ini? Is php.ini just one file or user can have own php.ini?

Br!

  • #5

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 opensslextension is recommended
The tokenizerextension is recommended
The ctypeextension is required.
The simplexmlextension 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

  • #6

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

  • #7

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

Moodle requires the iconv php extension. please install or enable the iconv extension.

  • #8

Should be ok if you have all the modules installed now.

  • #9

Should be ok if you have all the modules installed now.

Hello,

Thank you very much for your help. Everything is fne now with modules.

Best regards,
Elizabeta

How do I enable Iconv extension?

To enable iconv in Windows package installations of Moodle:.
Open the php. ini file found in the moodle/apache/bin folder..
Find the line: ;extension=php_iconv. dll..
Remove the ; at the beginning of the line..
Restart apache for the change to take effect..

How do I enable Iconv extension in cPanel?

Using cPanel First, we log in to WHM. Then, we choose EasyApache 4 or EasyApache 3 depending on the WHM version. After that, choose PHP extensions from the list of options available. Next, we choose the iconv extension based on the PHP version we use.

What version of PHP is my Moodle?

php page, to check that various aspects of your server meets the minimum requirement. For example, it checks PHP version, database version, various PHP extensions, and so on. The code to actually do the checking is in lib/environmentlib. php.

Does Moodle use PHP?

PHP is the scripting language in which Moodle is developed. It is integrated with your web server. The web server detects php pages (by their extension) and sends them to PHP for execution. PHP must be installed and configured properly for Moodle to work effectively (or at all).