run-all-webalizer.pl from logrotate

Hi,
I tried to run run-all-webalizer.pl as prerotate script from /etc/logrotate.d/apache2, but I get these errors:

[code:1]
Undefined subroutine &virtual_server::has_ftp_chroot called at ./virtual-server-lib.pl line 167.
Compilation failed in require at /usr/share/webmin/virtual-server/run-all-webalizer.pl line 24.
error: error running shared prerotate script for /var/log/apache2/.log /var/log/apache2/_log
[/code:1]

In /etc/logrotate.d/apache2 I added these lines:

[code:1]
prerotate
/usr/sbin/virtualmin run-all-webalizer.pl
endscript
[/code:1]

If I run "virtualmin run-all-webalizer.pl" from a terminal as root works perfectly.

Thanks in advance for any tip to fix it.
Santi

I forgot this important information.

Debian 4.0
Virtualmin Pro 3.64-2
webmin-virtual-server-theme 6.5-2

Anytime you see a Perl error when using Virtualmin (or its scripts) as documented, you should file a bug about it.