[pmwiki-users] how to see IP addresses to enter into Blocklist
Patrick R. Michaud
pmichaud at pobox.com
Mon Aug 8 13:53:54 CDT 2005
On Mon, Aug 08, 2005 at 02:39:51PM -0400, Radu wrote:
> What I meant is that that long-named variable is (and/or could be)
> used in many recipes, and it makes sense to keep it managed in a
> central location. Imagine someone has a weird webserver or
> configuration that doesn't make $_SERVER['REMOTE_ADDR'] available to
> php scripts... They'd have to go hunt down each place where that
> string is used and do something about it.
Not at all, they'd just add the following to config.php:
$_SERVER['REMOTE_ADDR'] = $ENV['BROKEN_WEBSERVERS_IDEA_OF_IP_ADDR'];
and it would all be taken care of.
But more to the point, REMOTE_ADDR is part of the CGI/1.1 specification,
and I think a webserver that doesn't implement CGI/1.1 deserves whatever
it gets. I don't think PmWiki should be trying to provide an abstraction
layer of every possible spec simply to accommodate the occasional broken
webserver. Also, I'm not a big fan of adding unnecessary overhead for
the vast majority of webservers that do properly implement the spec.
So, since webservers that fail to implement CGI are a minority, and
since there's an easy workaround for them, I don't think we need to
designate a special variable for them.
Pm
More information about the pmwiki-users
mailing list