WordPress.org

Make WordPress Core

Opened 12 months ago

Closed 5 months ago

#21077 closed enhancement (duplicate)

Custom port patch for MultiSite

Reported by: djzone Owned by:
Priority: normal Milestone:
Component: Multisite Version: 3.4
Severity: major Keywords:
Cc: ipstenu, 24-7@…, mindctrl

Description

This patch enables MultiSite to be used with a custom port, what must be defined as WP_CUSTOM_PORT in wp-config.php.

Attachments (3)

multisite-custom-port.patch (945 bytes) - added by djzone 12 months ago.
Multisite custom port patch
ms-settings_201308012128.php (1.4 KB) - added by F J Kaiser 5 months ago.
ms-settings_201201082128.patch (1.4 KB) - added by F J Kaiser 5 months ago.
Ignore previous patch - added .php extension per accident

Download all attachments as: .zip

Change History (13)

djzone12 months ago

Multisite custom port patch

comment:1 scribu12 months ago

Couldn't we use parse_url() for these things?

comment:2 nacin12 months ago

Yeah. ms-settings.php could stand for a scrub.

I've never been sure why custom ports are blocked in multisite. During the merge in 3.0, we tried to clean things up, but we tried not to ask "why" too often as everything would have been a rabbit hole.

We should probably review the history in MU and then work to just allow custom ports to work, without a constant.

comment:3 ipstenu12 months ago

  • Cc ipstenu added

comment:4 ipstenu12 months ago

Looks like it was hard coded in to use 80.

http://mu.wordpress.org/forums/topic/14587

comment:5 F J Kaiser7 months ago

  • Cc 24-7@… added
  • Severity changed from normal to major

+1 Just encountered a situation where I - in a local MU setup - can't use the default port of :80/:443. Now I'm left with a core hack.

comment:7 mindctrl7 months ago

  • Cc mindctrl added

comment:8 F J Kaiser5 months ago

  • Keywords needs-testing dev-feedback added

Scribus idea with parse_url is likely the route to go. Patch following that will

  • also takes the absence of $_SERVER['HTTP_HOST'] into account and switch to $_SERVER['SERVER_NAME'] for reliability and those edge cases
  • takes the domain via parse_url() and PHP_URL_PATH
  • still falls back to the default wp_die()-message in case somehow couldn't get rid of the port

Patch needs more intense testing.

F J Kaiser5 months ago

Ignore previous patch - added .php extension per accident

comment:9 F J Kaiser5 months ago

  • Keywords close added; has-patch needs-testing dev-feedback removed

Closed in favor of #15936 as it seems to address IPv6 issues as well. Adding new patch there.

comment:10 SergeyBiryukov5 months ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #15936.

Note: See TracTickets for help on using tickets.