HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   iconv in the ISPConfig chrooted environment (

dimas 26th August 2008 14:54

iconv in the ISPConfig chrooted environment
Please kindly help to set up iconv to work in the ISPConfig chrooted environment on Debian Etch.

Like with other programs I just added


to the APPS line in /root/ispconfig/scripts/shell/

and then enabled shell access for the site where iconv is needed.

Well, iconv IS copied and that's fine but apparently some libraries are not copied in the process - so when I type "iconv -l" from the user's shell, the list of supported encodings is considerably smaller that the list that I get if I type the same as root.

Please kindly advise what I have to add to "" in order to get all the available encodings for iconv (most important for me is windows-1251)?

dimas 26th August 2008 17:29

Well, I've solved this problem myself, but another one's cropped up. I'll start with the solution to the first one.

I used

strace iconv -f windows-1251 -t utf-8

as root to check what system calls iconv makes and so discovered that iconv makes use of files in /usr/lib/gconv/

After this it was a simple matter to add

mkdir /usr/lib/gconv


cp /usr/lib/gconv/* usr/lib/gconv

to ""

- so now iconv works in the chrooted environment.

However, there is another problem. I'm using a shell script to download an xml file from another server (the file contains currency exchange rates) and later use it in my flash site (I'm importing this xml file into flash by using XMLConnector, but that's a little beside the point).

I'm using a shell script named (by me), it goes like this:


wget -q http://www.(anotherserver).com/XML_daily.xml -O XML_daily.xml
iconv -f windows-1251 -t utf-8 -o /web/kurs.xml XML_daily.xml

I'm using iconv because the original xml file is in windows-1251, and I need utf-8 for flash.

Now the problem. If I just type


from inside the user's shell prompt, the script works as intended.

However, if I make a cron job (by putting "./" in the "Command:" line from inside ISPConfig), any file downloaded with wget just can't be moved to /web - and I need it there, otherwise I won't be able to access it from flash.

wget itself can't download to /web and even mv doesn't work from cron.

please kindly advise why this is happening...

dimas 26th August 2008 22:52

Well since I'm the administrator of the server, the workaround is to use the regular cron via crontab -e (the shell script works from cron if the crob job is added this way, as root).

However, I'm still extremely interested to know if it's possible to run it successfully from cron of a user's account...

All times are GMT +2. The time now is 06:33.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.