Re: se.php.net

From: Date: Fri, 08 Aug 2003 10:17:12 +0000
Subject: Re: se.php.net
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-19979@lists.php.net to get a copy of this message
Hehe, this one took me some figuring out. First it's MIRROR_STATS, not HAVE_STATS
Ups, sorry...
Secondly the sample says:
     # The next lines are only necessary if      # generating stats (see below)
     Alias /stats/ /path/to/local/stats/
     SetEnv MIRROR_STATS 1
Which I happily changed to
     SetEnv MIRROR_STATS 0
The sample says that these are not necessary (ie. don't put it there) if not generating stats...
when I initially configured the site thinking it's just a boolean flag. So I still couldn't figure out why you were complaining, untill I find this gem on line 210 in site.inc: // Override central stats information if specified in vhost if (isset($_SERVER['MIRROR_STATS'])) {
    $MIRRORS[$MYSITE][2] = TRUE;
} May I suggest that the if case is changed to if (isset($_SERVER['MIRROR_STATS']) && $_SERVER['MIRROR_STATS']) or something similar, or that the configuration sample explicitly states that the following lines should be commented out with #s
Yep, I will modify this code.
OK, so I fix the environmet, restart the server. Lo and behold! The link is still there! Scratches head... Aha! It picks up the default info from mirrors.inc, but theres nothing in site.inc to clear the flag in case the local environment has changed since the last update of mirrors.inc. May I finally suggest that the if case should be dropped entirely and replaced by this simple logic: $MIRRORS[$MYSITE][2] = isset($_SERVER['MIRROR_STATS']) && $_SERVER['MIRROR_STATS'];
We would like to keep the central info as accurate as possible. The mirror hosting company info also comes from the central, and we would not like to make execptions IMHO. So the update of mirrors.inc will be needed to make the link (dis)appear. Goba

« previous php.mirrors (#19979) next »