Seite 1 von 1
Fehler bei IP Tracking
Verfasst: 09.12.2005 20:32
von ultraslan33
Ich habe gerade das IP Tracking Mod installiert und es zeigte folgende Fehlermeldung:
Warning: Division by zero in /usr/export/www/vhosts/funnetwork/hosting/ugur33asyhell/admin/admin_ip_tracking.php on line 436
Warning: Division by zero in /usr/export/www/vhosts/funnetwork/hosting/ugur33asyhell/admin/admin_ip_tracking.php on line 437
Warning: Division by zero in /usr/export/www/vhosts/funnetwork/hosting/ugur33asyhell/admin/admin_ip_tracking.php on line 438
Warning: Division by zero in /usr/export/www/vhosts/funnetwork/hosting/ugur33asyhell/admin/admin_ip_tracking.php on line 439
Warning: Division by zero in /usr/export/www/vhosts/funnetwork/hosting/ugur33asyhell/admin/admin_ip_tracking.php on line 440
Fehler bei IP Tracking 2.
Verfasst: 19.12.2005 06:12
von kjwargan
Servus,
bei mir zeigt er das in den Zeilen 438 bis 442 an!
Das sind die Zeilen
Code: Alles auswählen
$total_percent = round ( $total_ips / $total_ips * 100, 1);
$users_percent = round ($total_users / $total_ips * 100, 1);
$guests_percent = round ($total_guests / $total_ips * 100, 1);
$bots_percent = round ($total_bots / $total_ips * 100, 1);
$admins_percent = round ($total_admins / $total_ips * 100, 1);
Aber nur, wenn ich die Konfiguration auf "Null" setze!
Ist das normal?
Verfasst: 18.01.2007 13:36
von .:Falo:.
Hi, das Thema ist zwar schon älter, aber ich habe das gleiche Problem. Kann jemand helfen???
Verfasst: 18.01.2007 13:51
von easygo
Das könnte helfen -->
admin_ip_tracking.php öffnen / suchen
Code: Alles auswählen
$total_percent = round ( $total_ips / $total_ips * 100, 1);
$users_percent = round ($total_users / $total_ips * 100, 1);
$guests_percent = round ($total_guests / $total_ips * 100, 1);
$bots_percent = round ($total_bots / $total_ips * 100, 1);
$admins_percent = round ($total_admins / $total_ips * 100, 1);
ersetzen durch
Code: Alles auswählen
$ipx = ( $total_ips <= 0 ) ? '1' : $total_ips;
$total_percent = round ( $total_ips / $ipx * 100, 1);
$users_percent = round ($total_users / $ipx * 100, 1);
$guests_percent = round ($total_guests / $ipx * 100, 1);
$bots_percent = round ($total_bots / $ipx * 100, 1);
$admins_percent = round ($total_admins / $ipx * 100, 1);
Feedback wär ok / easy
Verfasst: 18.01.2007 15:40
von .:Falo:.
Es klappt!!!!!
Vielen Dank @ easygo
Verfasst: 18.01.2007 19:21
von andreasOymann
noch besser:
Code: Alles auswählen
$total_percent = $total_ips == 0 ? '-' : round ( $total_ips / $total_ips * 100, 1);
$users_percent = $total_ips == 0 ? '-' : round ($total_users / $total_ips * 100, 1);
$guests_percent = $total_ips == 0 ? '-' : round ($total_guests / $total_ips * 100, 1);
$bots_percent = $total_ips == 0 ? '-' : round ($total_bots / $total_ips * 100, 1);
$admins_percent = $total_ips == 0 ? '-' : round ($total_admins / $total_ips * 100, 1);
Das erspart die zusätzliche Variable und gibt " - " aus, wenn nichts geloggt ist.
A.