Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 26th August 2008, 14:54
dimas dimas is offline
Senior Member
Join Date: Jul 2006
Posts: 125
Thanks: 7
Thanked 27 Times in 8 Posts
Default 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/create_chroot_env.sh

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 "create_chroot_env.sh" in order to get all the available encodings for iconv (most important for me is windows-1251)?
Reply With Quote
Sponsored Links
Old 26th August 2008, 17:29
dimas dimas is offline
Senior Member
Join Date: Jul 2006
Posts: 125
Thanks: 7
Thanked 27 Times in 8 Posts

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 "create_chroot_env.sh"

- 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) loadxml.sh, 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 "./loadxml.sh" 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...
Reply With Quote
Old 26th August 2008, 22:52
dimas dimas is offline
Senior Member
Join Date: Jul 2006
Posts: 125
Thanks: 7
Thanked 27 Times in 8 Posts

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...
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPconfig after installation cannot reach www.xyz.de:81 Figth4Linux Installation/Configuration 23 6th March 2008 23:38
ISPConfig Roadmap till Developers' Forum 26 10th June 2007 23:38
ISPConfig 2.3.1-dev released till General 0 8th May 2006 23:18
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 16:16
42goISP vs. ISPConfig nveid General 1 16th January 2006 10:07

All times are GMT +2. The time now is 00:47.

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