From: Matthew P. <mj...@ie...> - 2002-11-08 00:18:47
|
I've just gotten this bug report from a user of the Debian package of PHPWiki (reproduced in part below; the complete bug report and all subsequent discussion can be found at http://bugs.debian.org/168137). As all good users do, he's even produced a patch (attached) to correct the problem as he sees it. Is this a problem which the PHPWiki authors feel is a real problem? The patch should apply cleanly, and I'm going to apply and test it when I've got a bit more free time, but I thought it best to get this out to the upstream developers ASAP. -- ----------------------------------------------------------------------- #include <disclaimer.h> Matthew Palmer, Geek In Residence http://ieee.uow.edu.au/~mjp16 ---------- Forwarded message ---------- Date: Thu, 07 Nov 2002 10:02:06 +0100 From: Ulf Rompe <deb...@ro...> phpwiki uses $HTTP_SERVER_VARS['SERVER_NAME'] to build URLs. I believe that $HTTP_SERVER_VARS['HTTP_HOST'] should be used instead. Many systems have more than one name, and often the primary configured name is not resolvable from outside. In my case, the server is normally named "server.internal-nis-domain", but to be accessible via WWW it has an additional DNS entry calles like "server.official-domain.de". SERVER_NAME resolves to the first, unreachable name, whereas HTTP_HOST gives the right one (which has to be correct because it is the name we called to reach the PHP script). Maybe it would be possible to work around the problem by defining a VirtualHost (untested), but I think changing the variable would be the right way because HTTP_HOST is meant for this purpose. |