Last modified: 2010-05-15 15:59:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15542, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13542 - Bot loses session data when running on server
Bot loses session data when running on server
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.11.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://ardapedia.herr-der-ringe-film.de/
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-28 09:57 UTC by Konstantin Haase
Modified: 2010-05-15 15:59 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Konstantin Haase 2008-03-28 09:57:39 UTC
Hi, I wrote a bot API for MediaWiki in Ruby (http://freifunk-halle.de/~konstantin/rubot). That API runs smooth on my local wiki, a test wiki and so on. And if I try it with Ardapedia it works, too, but only from my laptop, not if I run it on my server. However, on my server I've got exactly the same version of Ruby and the Ruby Net::HTTP library I'm using, it even is exactly the same OS (Ubuntu Gutsy), though my server is amd64 and my laptop x86, but that should not matter. If I run exactly the same script on my server, login works fine and all, but when trying to edit some page, I get an error: "Sorry! We could not process your edit due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in." Still, the bot is logged in. Logging out and in and things like that don't solve it. And it is not possible that this error depends on my server's internet connection or something, since my local bot uses a private proxy on the server (since I'm surfing the internet via a wireless community network that the server is connected to via VPN). I even tried to use the proxy when running the script on the server, still session data is lost.

I don't use the build-in MediaWiki API, since it's not available on most of the wikis I intended the bot to be used for.

Note: I cannot change the wiki's configuration and contacting their technical admin really is a pain in the lower bottom. And since I want the bot to run smooth on as many wikis as possible this wouldn't be a satisfying solution, neither. And I have to run the bot on my server, since it is supposed to check for changes frequently.

Any help is welcome, thanks in advance
Comment 1 Roan Kattouw 2008-03-28 11:04:01 UTC
You need to check whether you logged in properly. To do so, please log in first (preferably through the API, with action=login), then run

api.php?action=query&meta=userinfo

which basically tells you who you are. You should get <userinfo id="123" name="Mybot" />. If you get <userinfo id="0" name="127.0.0.1" anon="" />, something went wrong with the login.

If that's the case, check that the login actually succeeded (i.e. see what action=login returns) and that you sent meta=userinfo (and subsequent requests) all the cookies action=login gave you.
Comment 2 Roan Kattouw 2008-09-06 21:55:43 UTC
Closing as WORKSFORME: no replies in 5 months. Please REOPEN if the issue persists.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links