Wrong charset, conversion from `utf-8′ to `windows-1251′ is not allowed chroot

Trying simple charset conversion with iconv: iconv(‘utf-8’, ‘windows-1251’, ‘test’); receive this error: Notice: iconv() [function.iconv]: Wrong charset, conversion from `utf-8′ to `windows-1251′ is not allowed in /var/htdocs/test.php on line 5

mod_php iconv() is not working properly if your apache is chrooted and you do not
have the content of /usr/lib/gconv/ folder into your relative chroot path (i.e. /your/chroot/path/usr/lib/gconv/).
You can simply do:

cp /usr/lib/gconv/* /your/chroot/path/usr/lib/gconv/

… and re-try.




coded by nessus