Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

iconv issues [solved] [for reference]
 
Core
Member
 
Total Posts:  68
Joined:  2008-03-09
 

Hi all

I was having issues with iconv on a production box.

the function

public function encodeString($string$charEncoding)
    
{
        
return iconv($charEncoding'CP1252//IGNORE'$string);
    
}

would fail with the error

Noticeiconv() [function.iconv]Wrong charsetconversion from `UTF-8' to `CP1252//IGNORE' is not allowed

I had tested this on a WAMP server at our office and iconv worked fine.
I’ve tested again on the hosting providers server and the error occured

The problem was with the configuration on the production box.

Because the webserver is in a chroot environment all the libraries need to be also placed in the chroot so that php and apache can access them.

In this case the locale conversion libraries were not copied over.

To get iconv running, the gconv libraries need placing inside the chroot

**This is for a Debian Etch server, others may place gconv elsewhere**

cp -R /usr/lib/gconv /chroot/apache/usr/lib/

Restart Apache

Thanks go to David from Inspire.net.nz for figuring this one out for me
Cheers David

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top