From e1377289b734e598adfae3ae0d9f15aa3947bf30 Mon Sep 17 00:00:00 2001 From: Camille Lafitte Date: Fri, 3 Apr 2009 10:06:57 +0000 Subject: [PATCH] Statistique brute compatible Apache2 * see #439, * A verifier mais il semble que ce ticket peut \303\252tre ferm\303\251. --- src/rawstat.daily | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rawstat.daily b/src/rawstat.daily index 7727c59c..018e45f8 100644 --- a/src/rawstat.daily +++ b/src/rawstat.daily @@ -32,6 +32,7 @@ require("/var/alternc/bureau/class/local.php"); $FILES_OWNER = 33; $APACHE_LOG = '/var/log/apache/access.log.1'; +$APACHE2_LOG = '/var/log/apache2/access.log'; umask(0177); $hosts = array(); $nolog_hosts = array(); @@ -80,8 +81,11 @@ while ($row = mysql_fetch_assoc($result)) { } //Open apache log file -if (!$apache_log_file = fopen($APACHE_LOG, 'r')) { - return 1; +//Open apache log file +if (!$apache_log_file = @fopen($APACHE_LOG, 'r')) { + if (!$apache_log_file = @fopen($APACHE2_LOG, 'r')) { + return 1; + } } //Parsing log file