Install php iconv extension ubuntu

How To Install "php-iconv" Package on Ubuntu

Quick Install Instructions of php-iconv on Ubuntu Server. It’s Super Easy! simply click on Copy button to copy the command and paste into your command line terminal using built-in APT package manager.

See below for quick step by step instructions of SSH commands, Copy/Paste to avoid miss-spelling or accidently installing a different package.



Quick Install Steps:

Step 1

Step 2

sudo apt-get install -y php-iconv

Step 3

Check the system logs to confirm that there are no related errors. You can use ZoomAdmin to check the logs, manager servers, host multiple websites and apps on your servers and more. The apps run in docker containers, to learn more
see ZoomAdmin Features for list of features and demo videos. And you can start with the Free Plan.

Execute the commands above step by step. You can simply hit the copy button to copy the command and paste into the command line interface.
Note: -y flag means to assume yes and silently install, without asking you questions in most cases.



Detailed Instructions:Step 1

Run update command to update package repositories and get latest package information.

Step 2

Run the install command with -y flag to quickly install the packages and dependencies.

sudo apt-get install -y php-iconv

Step 3

Check the system logs to confirm that there are no related errors. You can use ZoomAdmin to check the logs, manager servers, host multiple websites and apps on your servers and more. The apps run in docker containers, to learn more
see ZoomAdmin Features for list of features and demo videos. And you can start with the Free Plan.

Installing and upgrading help

Installing ICONV extension is required

  • ◄ Moodle to Moodle Migration - Best Strategy - Approach
  • New Install, appears there is no CSS styling ►

I am trying to install Moodle following error occur please help to complete installation 

Thanks 


Yes, you need to install the PHP iconv, zip, fileinfo, xmlrc [and whatever else] extensions.

It sounds like you have a very basic PHP installation. Without knowing what the operating system is and how PHP was installed, there isn't much else I can say,

Thanks for reply
I am Try to install PHP Extension using [Cpanel and WHM] login I am unable to solve this problem I think I have [Linux server]
Thanks

In which case... it's not really a Moodle problem. The best people to help you will be the support provided by your hosting.

Multiple php extensions to install.
Please see
//docs.moodle.org/38/en/PHP
//docs.moodle.org/dev/Moodle_3.8_release_notes

"Proudly Served by LiteSpeed"

Screen shot shows mulltipe cPanel tabs so would think your cPanel has some tool for Web service as well as PHP version + PHP extensions to load.  Don't use cPanel myself, but would imagine there is a cPanel page showing PHP extensions and you just need to click the box [check mark?] to tell server to use an extension.

'SoS', Ken

Thanks for Reply
I am trying to enable the required extension but no option which is required for my moodle
Image here

Your serve is hosted on asiaServerHost.com
That's your provider.

WHM and cPanels are provided by provider for customers to set up servers.
Moodle is only a PHP application that runs under a web service [Apache/Other ... your server is set up to use Litespeed].  Moodle requires a certain version of PHP + php extensions.  Without those extensions Moodle cannot be installed.

These forums are for Moodle but not configuration of WHM or cPanel on what could be 100's of thousands of providers. Contact technical support of your provider for specifics and details about how to use WHM/cPanel to install required PHP extensions.

'SoS', Ken

I am also having a little trouble with php-iconv. I am using Ubuntu. When I try to install php-iconv, I get php-common instead.

# apt install php-iconv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.4-common' instead of 'php-iconv'
php7.4-common is already the newest version [7.4.3-4ubuntu2.4].
php7.4-common set to manually installed.

I cannot install php-iconv, and moodle will not install without it.

The php-iconv module, seems to be installed.

# php -m | grep iconv

iconv 

I have restarted the webserver serveral times. But I keep getting the same error. "Moodle requires the iconv PHP extension. Please install or enable the iconv extension."

Don't use Ubuntu, but ... similar ... php-iconv is part of what is installed via php-common ... or supposed to be.

Does your server have multiple versions of PHP installed?

which php

use the full path shown in 'which' response and check version:

/full/path/to/php -v

Is that /full/path/to/php really an alias to a higher version of PHP?

Mind have to use a find as root user:

find / -name ??-iconv*

on an older Ubuntu that needs an upgrade to php to run higher version of Moodle, above command show:

/etc/php/7.0/apache2/conf.d/20-iconv.ini
/etc/php/7.0/cli/conf.d/20-iconv.ini

Also:

find / -name iconv.so

should show the .so file in something like:

/usr/lib/php/20151012/iconv.so

you might see version directories where it shows 20151012 above.

Howard uses Ubuntu ... maybe he'll jump in here an correct me!

'SoS', Ken

This command doesn't help. It tells you that command line PHP has it - but that's a separate thing from the web version.

In your web root write a short PHP file called test.php with the following contents..

Chủ Đề