Page MenuHomePhabricator

"You have entered an invalid IP address for Memcached: localhost."
Closed, ResolvedPublic

Description

When setting up a new wiki on trunk (as of r93014), I put in for the Memcached config option "localhost:11211" to use my local memcached instance.

On submission, I got kicked back to the top of the same form with this error:

"You have entered an invalid IP address for Memcached: localhost."

In addition, some glitches in the page state:

  • lost selections from the extension checkboxes
  • caching subform shows off, instead of memcached which I last left it at. (reselecting it shows the localhost:11211 line I had put in before, so the data's still there)

Changing it to "127.0.0.1:11211" resolves this for me, but it sounds like the installer is trying to validate the host portion of memcached lines as raw IP addresses *only*. It's perfectly legit to use hostnames here.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=25855

Details

Reference
bz30041

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:50 PM
bzimport set Reference to bz30041.

Bug introduced in r82687 for bug 25855.

Switching it to try resolving a hostname should be easy -- on it :D

r97772 adds a gethostbyname() check if there is something but it's not an IP address; it now passes through 'localhost:11211' and anything else in your DNS or hosts, but will still reject things that can't be resolved to protect against misspells.

The memcached selection is still missing on the next page load...

r97774 fixes the radio button initial value when coming back to the page via validation check or 'back', and makes sure that the memcached server textarea fold-out is initially shown if memcached is selected.