WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#12457 closed defect (bug) (fixed)

Using localhost without VHOST should be allowed for MS sites

Reported by: Denis-de-Bernardy Owned by: nacin
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch needs-testing featured
Focuses: Cc:
PR Number:

Description

I recall managing to have made WPMU work in such a setup, using IIS on a Windows box. I fail to see why an Apache Box running on a Mac can't do as much.

Attachments (1)

12457.diff (2.8 KB) - added by Denis-de-Bernardy 10 years ago.
first pass: allow to install MS in localhost/~denis/wp-trunk/

Download all attachments as: .zip

Change History (16)

@Denis-de-Bernardy
10 years ago

first pass: allow to install MS in localhost/~denis/wp-trunk/

#1 @Denis-de-Bernardy
10 years ago

  • Keywords has-patch added

#2 @Denis-de-Bernardy
10 years ago

  • Keywords needs-testing added

Tested on MacOS X/Apache, I'm not running into any issues (beyond the bugs I'm reporting) while playing around with the network options.

Needs testing by a few more devs.

#3 @nacin
10 years ago

What's wrong with localhost.localdomain?

#4 @Denis-de-Bernardy
10 years ago

  • Keywords featured added

#5 @westi
10 years ago

This sounds like a reasonable idea.

It would be great to have an easy way to test on localhost for subdir multisite installs.

#6 @nacin
10 years ago

I agree. Unless I'm missing something, the only reason is for subdomain installs, in which case this looks good.

#7 @nacin
10 years ago

  • Owner set to nacin
  • Status changed from new to reviewing

Apparently, the historical reason for blocking localhost lies with cookie domains. I briefly looked through the code and did not see this to be a problem at this point.

I have a refreshed patch already running locally, so I'll kick the tires a bit more on this.

#8 @nacin
10 years ago

  • Status changed from reviewing to accepted

Some notes:

First, http://trac.mu.wordpress.org/ticket/182, from 2006.

Second, I ran into some cookie problems converting a localhost.localdomain install to localhost. But a fresh install performed great. (I probably missed something I needed to change in the DB in the conversion attempt.)

I'm going to commit some improvements and also my patch. If we find it has problems, we can revert.

#9 @nacin
10 years ago

Actually, I forgot -- I did have to make a modification to the constant definitions to make it work.

#10 @nacin
10 years ago

(In [13622]) Allow localhost in a multisite subdirectory install. More network.php improvements. see #12457 for localhost. see #11816

#11 follow-up: @nacin
10 years ago

I'm thinking we can abstract this out further and check for the lack of a period in the hostname, instead of == 'localhost'. Necessary?

#12 in reply to: ↑ 11 ; follow-up: @Denis-de-Bernardy
10 years ago

Replying to nacin:

I'm thinking we can abstract this out further and check for the lack of a period in the hostname, instead of == 'localhost'. Necessary?

that would be slower. are there any benefits for doing so?

#13 in reply to: ↑ 12 @nacin
10 years ago

Replying to Denis-de-Bernardy:

Replying to nacin:
that would be slower. are there any benefits for doing so?

Slower? Marginally. The benefit is we would catch the rare local hostname that isn't localhost but also doesn't support subdomains.

#14 @wpmuguru
10 years ago

(In [13707]) fix warning on cookie_domain, see #12457

#15 @nacin
10 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Re-open if any other bugs are found in testing.

Note: See TracTickets for help on using tickets.