{"id":341,"date":"2014-12-14T18:25:46","date_gmt":"2014-12-14T12:25:46","guid":{"rendered":"http:\/\/hasibul.info\/blog\/?p=341"},"modified":"2015-02-09T03:19:49","modified_gmt":"2015-02-08T21:19:49","slug":"solution-for-deprecated-function-iconv_set_encoding-error-while-joomla-installation-in-php-5-6","status":"publish","type":"post","link":"https:\/\/hasibul.info\/blog\/2014\/12\/14\/solution-for-deprecated-function-iconv_set_encoding-error-while-joomla-installation-in-php-5-6\/","title":{"rendered":"Solution for Deprecated function iconv_set_encoding() error while Joomla Installation in php 5.6"},"content":{"rendered":"<p>If you are trying to install Joomla (or other CMS) in php 5.6 environment and encounter the error :\u00a0Deprecated: iconv_set_encoding()<br \/>\n&#8211; I&#8217;ve got a solution for you.<\/p>\n<p>The error may look like following:<\/p>\n<blockquote><p><b style=\"color: #333333;\">Deprecated<\/b><span style=\"color: #333333;\">: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in<strong>\u00a0joomlaroot<\/strong><\/span><b style=\"color: #333333;\">\\libraries\\joomla\\string\\string.php<\/b><span style=\"color: #333333;\">\u00a0on line\u00a0<\/span><b style=\"color: #333333;\">27<\/b><br style=\"color: #333333;\" \/><br style=\"color: #333333;\" \/><b style=\"color: #333333;\">Deprecated<\/b><span style=\"color: #333333;\">: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in<strong>\u00a0joomlaroot<\/strong><\/span><b style=\"color: #333333;\">\\libraries\\joomla\\string\\string.php<\/b><span style=\"color: #333333;\">\u00a0on line\u00a0<\/span><b style=\"color: #333333;\">28<\/b><br style=\"color: #333333;\" \/><br style=\"color: #333333;\" \/><b style=\"color: #333333;\">Deprecated<\/b><span style=\"color: #333333;\">: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in<strong>\u00a0joomlaroot<\/strong><\/span><b style=\"color: #333333;\">\\libraries\\joomla\\string\\string.php<\/b><span style=\"color: #333333;\">\u00a0on line\u00a0<\/span><b style=\"color: #333333;\">29<\/b><\/p><\/blockquote>\n<p>Open the file string.php in &#8220;<span style=\"color: #333333;\"><strong>joomlaroot<\/strong><\/span><b style=\"color: #333333;\">\\libraries\\joomla\\string\\&#8221;<\/b>\u00a0directory. Go to line 27.<\/p>\n<p>Now change the following lines:<\/p>\n<blockquote><p>if (function_exists(&#8216;iconv&#8217;))<br \/>\n{<br \/>\n\/\/ These are settings that can be set inside code<br \/>\niconv_set_encoding(&#8220;internal_encoding&#8221;, &#8220;UTF-8&#8221;);<br \/>\niconv_set_encoding(&#8220;input_encoding&#8221;, &#8220;UTF-8&#8221;);<br \/>\niconv_set_encoding(&#8220;output_encoding&#8221;, &#8220;UTF-8&#8221;);<br \/>\n}<\/p><\/blockquote>\n<p>to the following:<\/p>\n<blockquote><p>if (function_exists(&#8216;iconv&#8217;) &amp;&amp; PHP_VERSION_ID &lt; 50600)<br \/>\n{<br \/>\n\/\/ These are settings that can be set inside code<br \/>\niconv_set_encoding(&#8220;internal_encoding&#8221;, &#8220;UTF-8&#8221;);<br \/>\niconv_set_encoding(&#8220;input_encoding&#8221;, &#8220;UTF-8&#8221;);<br \/>\niconv_set_encoding(&#8220;output_encoding&#8221;, &#8220;UTF-8&#8221;);<br \/>\n}<br \/>\nelseif (PHP_VERSION_ID &gt;= 50600)<br \/>\n{<br \/>\nini_set(&#8216;default_charset&#8217;, &#8216;UTF-8&#8217;);<br \/>\n}<\/p><\/blockquote>\n<p>This should resolve the problem and let you progress to the next level during Joomla installation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are trying to install Joomla (or other CMS) in php 5.6 environment and encounter the error :\u00a0Deprecated: 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\u00a0joomlaroot\\libraries\\joomla\\string\\string.php\u00a0on line\u00a027Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in\u00a0joomlaroot\\libraries\\joomla\\string\\string.php\u00a0on line\u00a028Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is&hellip;<\/p>","protected":false},"author":1,"featured_media":342,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,40,12],"tags":[133,262,132,134],"how-to":[],"_links":{"self":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/posts\/341"}],"collection":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":0,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/media\/342"}],"wp:attachment":[{"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/tags?post=341"},{"taxonomy":"how-to","embeddable":true,"href":"https:\/\/hasibul.info\/blog\/wp-json\/wp\/v2\/how-to?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}