Exception: Notice: Use of undefined constant ICONV_IMPL Print

  • 1

Exception: Notice: Use of undefined constant ICONV_IMPL

Normally this is caused by missing "iconv" PHP extension, or lacking iconv configuration inside your php.ini file.

First, log in to your server via SSH and paste in the following:
php -i | grep 'iconv support'

If iconv is enabled and included in your PHP version, you should see "iconv support => enabled" but if you see nothing here, you'll need to check with your server administrator to find out more about your PHP version. If you are a KubeServers customer you should not see this error.

If you have a cPanel server, it might be that you have accidentally unselected the iconv extension in WHM. To check this, log in to WHM, click Software, then EasyApache 4, and look out for the iconv extension against your selected version of PHP.

Once you have iconv support enabled, the next step is to edit your php.ini file to enable iconv features. With cPanel servers, this can be edited by logging into WHM, clicking Software, then MultiPHP INI Editor.

If you have a server without a control panel, enter the following into your SSH terminal:
php -i | grep php.ini
This will show you the location of your php.ini file. You can then use your favourite text editor to edit this file.

Once you have your respective php.ini file open and ready to edit, we need to uncomment (or add) the following iconv entries:
iconv.input_encoding = ISO-8859-1
iconv.internal_encoding = ISO-8859-1
iconv.output_encoding = ISO-8859-1
intl.error_level = 0

Once you have those added, edited or uncommented, it's time to restart your web server. Next refresh of your Magento site in your browser.


Was this answer helpful?

« Back