Send MediaWiki-l mailing list submissions to
mediawiki-l(a)lists.wikimedia.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
or, via email, send a message with subject or body 'help' to
mediawiki-l-request(a)lists.wikimedia.org
You can reach the person managing the list at
mediawiki-l-owner(a)lists.wikimedia.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MediaWiki-l digest..."
Today's Topics:
1. Re: CentralAuth: Global accounts not globally usable
(Till Kraemer)
2. Re: Newbie question about pywikibot (Quim Gil)
3. Re: Newbie question about pywikibot (Leonard Wallentin)
----------------------------------------------------------------------
Message: 1
Date: Tue, 14 Jan 2014 22:17:51 +0100
From: Till Kraemer <info(a)till-kraemer.com>
To: MediaWiki announcements and site admin list
<mediawiki-l(a)lists.wikimedia.org>
Subject: Re: [MediaWiki-l] CentralAuth: Global accounts not globally
usable
Message-ID: <52D5A97F.5060207(a)till-kraemer.com>
Content-Type: text/plain; charset=UTF-8
Hi Chris,
thanks again for your help! I really appreciate it.
On 1/13/2014 10:19 PM, Chris Steipp wrote:
This often happens when Memcached can't be
reached / used. CentralAuth
requires memcache caching, so make sure that's working.
Hm, weird. I just
re-checked and memcached seems to be running:
# ps ax | grep memcached
12345 ?? Ss 0:48.20 /usr/local/bin/memcached -d -u _memcached -P
/var/run/memcached.pid
I started memcached a while ago like this:
sudo -u www memcached -d -l 127.0.0.1 -p 11211 -m 64
My memcached settings in LocalSettings.php look like this:
$wgMainCacheType = CACHE_MEMCACHED;
$wgParserCacheType = CACHE_MEMCACHED; # optional
$wgMessageCacheType = CACHE_MEMCACHED; # optional
$wgMemCachedServers = array( "127.0.0.1:11211" );
$wgSessionsInMemcached = true; # optional
However, I didn't install PECL memcache for PHP as recommended on the
Extension:Memcached page. I installed PECL memcache now and also
Extension:Memcached and on Special:Memcached it says:
127.0.0.1:11211 Memcached seems to be working fine!
After I installed PECL memcache I restarted Apache and I got the
following message (but I guess that's okay):
# apachectl start
Starting memcached
failed to listen on TCP port 11211: Address already in use
/usr/sbin/apachectl start: httpd started
This is expected on login, assuming you're
submitting the login form as a
logged out user (it does the user setup for all pages, including the login
page, before it starts handling the contents of the form itself. The
interesting stuff should be a few lines later.
Sorry, here is what
debug-poolwiki.log looks like:
Start command line script /path/to/pool/w/maintenance/runJobs.php
CACHES: MemcachedPhpBagOStuff[main] MemcachedPhpBagOStuff[message]
MemcachedPhpBagOStuff[parser]
LocalisationCache: using store LCStore_DB
CentralAuthHooks::onUserLoadFromSession: no token or session
Fully initialised
IP: 127.0.0.1
Connected to database 0 at 1.2.3.4
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
And debug-dewiki.log has entries like these:
Start command line script /path/to/de/w/maintenance/runJobs.php
CACHES: MemcachedPhpBagOStuff[main] MemcachedPhpBagOStuff[message]
MemcachedPhpBagOStuff[parser]
Class LanguageDe not found; skipped loading
LocalisationCache: using store LCStore_DB
Connecting to 1.2.3.4 dewiki...
Connected to 1.2.3.4 dewiki.
Connected to database 0 at 1.2.3.4
Dependency triggered: /path/to/de/w/languages/messages/MessagesDe.php
deleted.
LocalisationCache::isExpired(de): cache for de expired due to FileDependency
LocalisationCache::recache: got localisation for de from source
DatabaseBase::query: Writes done: DELETE FROM `l10n_cache` WHERE lc_lang
= 'de'
Unstubbing $wgParser on call of $wgParser::setFunctionHook from
SimpleSecurity::setup
Parser: using preprocessor: Preprocessor_DOM
Fully initialised
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
While debug-enwiki.log looks like this:
Start command line script /path/to/en/w/maintenance/runJobs.php
CACHES: MemcachedPhpBagOStuff[main] MemcachedPhpBagOStuff[message]
MemcachedPhpBagOStuff[parser]
LocalisationCache: using store LCStore_DB
Unstubbing $wgParser on call of $wgParser::setFunctionHook from
SimpleSecurity::setup
Parser: using preprocessor: Preprocessor_DOM
Connecting to 1.2.3.4 enwiki...
Connected to 1.2.3.4 enwiki.
Connected to database 0 at 1.2.3.4
Dependency triggered: /path/to/en/w/languages/messages/MessagesEn.php
deleted.
LocalisationCache::isExpired(en): cache for en expired due to FileDependency
LocalisationCache::recache: got localisation for en from source
DatabaseBase::query: Writes done: DELETE FROM `l10n_cache` WHERE lc_lang
= 'en'
Fully initialised
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
If they're all in the same top level domain,
this is probably the better
way to do it.
Yes, they're just different subdomains, but they're all
something like
xx.example.com. So I've set $wgCentralAuthCookieDomain = '.example.com';.
This should only happen if you have wgSecureLogin
enabled for a wiki, or
you have https in wgServer. You'll want to get that fixed before you can
get much further in setting up CentralAuth.
It seems to be a Firefox specific
problem. I don't get this error with
other browsers. I deleted cookies and cache in Firefox and now it works.
Now I don't have to log in manually on each domain anymore, cool! :)
Thanks and cheers,
Till
------------------------------
Message: 2
Date: Tue, 14 Jan 2014 14:04:25 -0800
From: Quim Gil <qgil(a)wikimedia.org>
To: mediawiki-l(a)lists.wikimedia.org
Subject: Re: [MediaWiki-l] Newbie question about pywikibot
Message-ID: <52D5B469.1000305(a)wikimedia.org>
Content-Type: text/plain; charset=UTF-8
Hi Leonard,
On 01/07/2014 12:07 PM, Leonard Wallentin wrote:
Hello,
I wonder if there are any pywikibot wizards on the list who can help me
getting on the right track;
Your questions about PyWikiBot have a higher chance
of find answers at
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I have been fetching data from WikiData like
this:
`action=wbgetentities&languages=XXX&props=labels|claims&ids=Q100|Q101|Q102`
Now I want to try doing the same thing with pywikibot, to make logging in
etc easier, but I can't find out how to fetch data for more than one page
at a time. So far I've found `pagegenerators.PagesFromTitlesGenerator` to
generate a collection of page titles, but I don't know what to do with it
(other than iterate through it to fetch one page at a time...) What am I
missing?
Thanks in advance for any advice!
Leo