Unknown encoding 'ANSI'

Hello,

every thirty minutes user root gets a message from CRON DAEMON

Error - Perl execution failed

Unknown encoding 'ANSI' at /usr/share/webmin/mailboxes/boxes-lib.pl line 1621

How can I fix this?

Kind Regards Frank

Status: 
Active

Comments

Howdy -- take a look at the file /etc/cron.d/awstats -- what are it's contents?

If it's not commented out, my suggestion would be to comment out all the lines in that file.

Virtualmin uses another cron job for generating it's own awstats statistics, you don't actually need that one, and it can generate the errors you're seeing if not commented out. That normally occurs automatically during the installation process, but it's possible that didn't happen for some reason.

Hello,

the content of /etc/cron.d/awstats is

MAILTO=root

# */10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

# Generate static reports:
# 10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh

More interestings - and maybe the real cause of the failure message - seems the content of /etc/cron.d/php5

# /etc/cron.d/php5: crontab fragment for php5
#  This purges session files older than X, where X is defined in seconds
#  as the largest value of session.gc_maxlifetime from all your php.ini
#  files, or 24 minutes if not defined.  See /usr/lib/php5/maxlifetime

# Look for and purge old sessions every 30 minutes
0,30 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

This one is the only one executet every 30 minutes

root gets the following message from Cron Daemon

Cron Daemon 2014/04/24 17:00 0.80 kB Cron <root@mail> [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && fin ..

The content of the message:

Error - Perl execution failed
Unknown encoding 'ANSI' at /usr/share/webmin/mailboxes/boxes-lib.pl line 1621

The line 1621 of /usr/share/webmin/mailboxes/boxes-lib.pl

1615 # convert_to_utf8(string, string-charset)
1616 # If possible, convert a string to the UTF-8 charset
1617 sub convert_to_utf8
1618 {
1619 my ($str, $cs) = @_;
1620 &can_convert_to_utf8(@_); # Load modules
1621 $str = Encode::decode($cs, $str);
1622 utf8::encode($str);
1623 return $str;
1624 }

I really get stucked with this. Is it save to comment out the content of /etc/cron.d/php5?

Kind Regards Frank

If you look at the contents of those emails outside of Usermin, what does it show as the message body?

It may be a simple issue with that php5 cron job that needs tweaked, but Usermin is throwing an unrelated error it seems.

That's doing the trick!

message body gives the hint: geoip module already loaded

Thanks for showing me the direction.

Kind Regards Frank