https://bugzilla.wikimedia.org/show_bug.cgi?id=25855

           Summary: Installer fails to validate memcached server format,
                    throws notices on use later
           Product: MediaWiki
           Version: wikimedia-deployment
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: Installation
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: br...@pobox.com


I did a fresh local setup with current trunk; all defaults plus use of
memcached, where I listed "localhost" in the servers field. This produces these
lines in config:

  ## Shared memory settings
  $wgMainCacheType    = CACHE_MEMCACHED;
  $wgMemCachedServers = array( 'localhost' );


The memcached client library seems to assume that hosts will be consistently
provided in "<host>:<port>" format, leading to a notice being thrown here if we
got an entry that only had the host:

Notice: Undefined offset: 1 in /var/www/wiki/includes/memcached-client.php on
line 692

Call Stack:
    0.0016     684584   1. {main}() /var/www/wiki/index.php:0
    0.0037     732512   2. require_once('/var/www/wiki/includes/WebStart.php')
/var/www/wiki/index.php:41
    0.0220    1779440   3. require_once('/var/www/wiki/includes/Setup.php')
/var/www/wiki/includes/WebStart.php:142
    0.0562    4320528   4. wfIncrStats() /var/www/wiki/includes/Setup.php:316
    0.0563    4320912   5. MWMemcached->incr()
/var/www/wiki/includes/GlobalFunctions.php:2295
    0.0563    4321128   6. MWMemcached->_incrdecr()
/var/www/wiki/includes/memcached-client.php:518
    0.0563    4321128   7. MWMemcached->get_sock()
/var/www/wiki/includes/memcached-client.php:828
    0.0563    4321128   8. MWMemcached->sock_to_host()
/var/www/wiki/includes/memcached-client.php:759
    0.0563    4321432   9. MWMemcached->_connect_sock()
/var/www/wiki/includes/memcached-client.php:1016

That's this code here:

    function _connect_sock( &$sock, $host ) {
        list( $ip, $port ) = explode( ':', $host );

Either we should fix that code to be more pleasant and handle auto fallback to
the default memcached port 11211, or the installer should validate the format
of provided server entries.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to