Last modified: 2010-05-15 15:59:53 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
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.
Closing as WORKSFORME: no replies in 5 months. Please REOPEN if the issue persists.