Re: se.php.net
| From: | Fredrik Ohrn | Date: | Fri, 08 Aug 2003 08:32:36 +0000 |
| Subject: | Re: se.php.net | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-19976@lists.php.net to get a copy of this message | ||
On Thu, 7 Aug 2003, Gabor Hojtsy wrote:
> Hi Frederik!
>
> We have realized, that you have the HAVE_STATS environment variable set
> in your PHP.net mirror vhost setup, but actually you don't have any
> stats set up on your mirror. Would you be so kind, and have the correct
> data (ie. no environment var on stats), so our system won't think of
> your mirror as one having stats?
>
> Thanks,
> Goba
>
Hehe, this one took me some figuring out.
First it's MIRROR_STATS, not HAVE_STATS
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
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
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'];
Regards,
Fredrik
--
It's down there somewhere, let me take another look.
- The Dude
Fredrik Öhrn Chalmers University of Technology
ohrn@chl.chalmers.se Sweden