I've just installed pbpMyFAQ successfully on NetWare and Win32 platform; however when I use non-standard ports, f.e. 8080/8443 then I get the port appended a second time which breaks all links.
I looked further into it, and found that this is due to the logic in ./inc/Link.php where the port gets appended if non-standard, but at least with Apache I see that the port _is_ already appended with the HTTP_HOST var coming from Apache, and the function getSystemUri() appends it then for a second time. I've patched getSystemUri() to fix this:
Code: Select all
--- Link.php.orig Thu Mar 29 20:56:28 2007
+++ Link.php Wed May 23 01:20:55 2007
@@ -341,7 +341,7 @@
{
// $_SERVER['HTTP_HOST'] is the name of the website or virtual host name
$sysUri = PMF_Link::getSystemScheme().$_SERVER['HTTP_HOST'];
- if (($_SERVER['SERVER_PORT'] != '80') && ($_SERVER['SERVER_PORT'] != '443')) {
+ if (($_SERVER['SERVER_PORT'] != '80') && ($_SERVER['SERVER_PORT'] != '443') && !strpos($_SERVER['HTTP_HOST'], ":")) {
$sysUri .= ':'.$_SERVER['SERVER_PORT'];
}
here's a sample to demonstrate the issue:
http://www.gknw.net:8080/phpmyfaq/t.php
greets, Günter.