2
BY HASIB DECEMBER 14, 2014 DID YOU KNOW? , JOOMLA, TIPS & TRICKS Solution for Deprecated function iconv_set_encoding() error while Joomla Installation in php 5.6 If you are trying to install Joomla (or other CMS) in php 5.6 environment and encounter the error : Deprecated: iconv_set_encoding() I’ve got a solution for you. The error may look like following: Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in joomlaroot\libraries\joomla\string\string.php on line 27 Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in joomlaroot\libraries\joomla\string\string.php on line 28 Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in joomlaroot\libraries\joomla\string\string.php on line 29 Open the file string.php in “joomlaroot\libraries\joomla\string\” directory. Go to line 27. Now change the following lines: if (function_exists(‘iconv’)) { // These are settings that can be set inside code iconv_set_encoding(“internal_encoding”, “UTF8″); iconv_set_encoding(“input_encoding”, “UTF8″); iconv_set_encoding(“output_encoding”, “UTF8″); } to the following: if (function_exists(‘iconv’) && PHP_VERSION_ID < 50600) { // These are settings that can be set inside code iconv_set_encoding(“internal_encoding”, “UTF8″); iconv_set_encoding(“input_encoding”, “UTF8″); iconv_set_encoding(“output_encoding”, “UTF8″); } elseif (PHP_VERSION_ID >= 50600) { ini_set(‘default_charset’, ‘UTF8′);

Solution

Embed Size (px)

DESCRIPTION

Solution

Citation preview

  • BYHASIB DECEMBER

    14,2014

    DID

    YOU

    KNOW?,JOOMLA,TIPS

    &

    TRICKS

    SolutionforDeprecatedfunctioniconv_set_encoding()errorwhileJoomlaInstallationinphp5.6

    IfyouaretryingtoinstallJoomla(orotherCMS)inphp5.6environmentandencountertheerror:Deprecated:iconv_set_encoding()Ivegotasolutionforyou.

    Theerrormaylooklikefollowing:

    Deprecated:iconv_set_encoding():Useoficonv.internal_encodingisdeprecatedinjoomlaroot\libraries\joomla\string\string.phponline27

    Deprecated:iconv_set_encoding():Useoficonv.input_encodingisdeprecatedinjoomlaroot\libraries\joomla\string\string.phponline28

    Deprecated:iconv_set_encoding():Useoficonv.output_encodingisdeprecatedinjoomlaroot\libraries\joomla\string\string.phponline29

    Openthefilestring.phpinjoomlaroot\libraries\joomla\string\directory.Gotoline27.

    Nowchangethefollowinglines:

    if(function_exists(iconv)){//Thesearesettingsthatcanbesetinsidecodeiconv_set_encoding(internal_encoding,UTF8)iconv_set_encoding(input_encoding,UTF8)iconv_set_encoding(output_encoding,UTF8)}

    tothefollowing:

    if(function_exists(iconv)&&PHP_VERSION_ID=50600){ini_set(default_charset,UTF8)

  • }ThisshouldresolvetheproblemandletyouprogresstothenextlevelduringJoomlainstallation.