PHPNUKE module strips ports

vgfh

Joined: 2007-02-17
Posts: 1
Posted: Sat, 2007-02-17 05:13

Ok, I searched the forums, and came across a hint of an answer involving $SERVER_PORT but nothing concrete. The problem is this. I've installed gallery, it works fine as standalone, but when trying to access it through phpnuke, it strips my port numbers from the links, causing them to be dead. I have all the URLS in the config file with port numbers, however, this doesn't help one bit.

The standalone can be found here:
http://fist.strangled.net:8080/html/modules/gallery/index.php

The PHPNUKE integration can be found here:
http://fist.strangled.net:8080/html/modules.php?name=gallery

This is driving me mad, as I really want this in phpnuke, however my ISP blocks port 80.

Any help people can offer would be greatly appreciated.
-Vgfh

The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://fist.strangled.net:8080/html/modules/gallery/index.php and http://fist.strangled.net:8080/html/modules.php?name=gallery
Gallery version: This version of Gallery was released on 13/11/2006 (1.6 alpha 3)
Apache version:Apache/2.2.3 (Win32)
PHP version (don't just say PHP 4, please):PHP v5.2.0
Graphics Toolkit:ImageMagick
Operating system:Win XP
Web browser/version (if applicable):

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Mon, 2007-02-26 10:20

Hello,

you are right, this is a bug in the 1.x series.
Would you mind filing a bug in our Sourceforge pages ?

- Jens

--
Last Gallery v1 Developer and v1 translation manager.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sun, 2007-03-04 18:52

Here is the fix:

open lib/url.php

- $urlprefix = $gUrl['scheme'] .'://'. $gUrl['host'];
+
+ if(isset($gUrl['port'])) {
+ $urlprefix = $gUrl['scheme'] .'://'. $gUrl['host'] . ':' . $gUrl['port'];
+ }
+ else {
+ $urlprefix = $gUrl['scheme'] .'://'. $gUrl['host'];
+ }

Jens
--
Last Gallery v1 Developer and v1 translation manager.