Knowledgebase
iconv_set_encoding error in Joomla installation
Posted by WestNIC Support on 19 January 2016 11:21 PM

You may receive following error on Joomla installation page: "Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in /home/username/public_html/libraries/joomla/string/string.php on line 27"

To fix this error, you need edit following file: /home/username/public_html/libraries/joomla/string/string.php

Please find following lines:

 

 

if (function_exists('iconv'))
{
// These are settings that can be set inside code
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("input_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "UTF-8");
}

 

 

Then replace them with:

 

if (function_exists('iconv') && PHP_VERSION_ID < 50600)
{
// These are settings that can be set inside code
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("input_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "UTF-8");
}
elseif (PHP_VERSION_ID >= 50600)
{
ini_set("default_charset", "UTF-8");
}

 

 

It will fix "Deprecated: iconv_set_encoding()" error.
If you receive "ini_set disabled" error, please create php.ini file with following data:

 

extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, allow_url_fopen, ini_alter, proc_terminate, proc_get_status, proc_nice, escapeshell, eshellarg, escapeshellcmd, dl, symlink

 

You must put this file inside following folders: public_html, administrator, installation and libraries.

 

If you receive "time zone" errors, please add following line at the very bottom of php.ini file:

date.timezone = "America/New_York"

(1 vote(s))
This article was helpful
This article was not helpful

Help Desk Software by Kayako Resolve