Does any one knows what this error means? Illegal modulus zero at ./mailboxes-lib.pl line 477 Thanks.
It would be helpful to post line 477 but without it (and not having done Perl for a long time) I think it would be safe to assume that you're either doing a modulo call (x % y) or doing a division (x / y) where y is 0. You should probably test that it's not zero before doing the calculation.
Yup, modulus just gets the remainder when you divide by something - probably either devided by zero, or trying to mathematical calls with non-numeric values.
I didn't program any perl scripts. I use webmin as the web interface to view the services in the server. I get this error when i click to view the mailboxes in the qmail window. The complete error shoes - User mailboxes HTTP/1.0 500 Perl execution failed Server: MiniServ/0.01 Date: Sat, 31 Mar 2007 22:30:47 GMT Content-type: text/html Connection: close Error - Perl execution failed Illegal modulus zero at ./mailboxes-lib.pl line 477.
mailboxes-lib.pl line 471 else { line 472 # Just showing username (and maybe size) line 473 print &ui_table_start($text{'index_header'}, "width=100%", $config{'column_count'}); line 474 local $i = 0; line 475 foreach $u (@users) { line 476 next if($config{'ignore_users_enabled'} == 1 && $config{'ignore_users'} =~ /$u->[0]/); line 477 print "<tr>\n" if ($i % $config{'column_count'} == 0); line 478 print "<td width=", int(100/$config{'column_count'}), "%><a href='list_mail.cgi?user=$u->[0]'>"; line 479 print $u->[0]; line 480 if ($config{'show_size'} == 1) { line 481 local @folders = &list_user_folders(@$u); line 482 local $total = &folder_size(@folders); line 483 if ($size{$u->[0]} > 0) {
I haven't done Perl in a long time, but if you changed: print "<tr>\n" if ($i % $config{'column_count'} == 0); Code (markup): to: print "<tr>\n" if (($config{'column_count'} == 0) || ($i % $config{'column_count'} == 0)); Code (markup): I think you should be right. Or, alternatively, look at your config and work out why 'column_count' is zero...