Statistique brute compatible Apache2

* see #439,
 * A verifier mais il semble que ce ticket peut \303\252tre ferm\303\251.
This commit is contained in:
Camille Lafitte 2009-04-03 10:06:57 +00:00
parent 9d9caa80da
commit e1377289b7
1 changed files with 6 additions and 2 deletions

View File

@ -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