1.17.0 cookies error with image upload script

Jump to: navigation, search

Hello all, Our office MediaWiki is currently operating: MediaWiki 1.17.0 PHP 5.3.3 (apache2handler) MySQL 5.0.77-log

The perl script we've used to upload images in earlier versions of MediaWiki is now encountering a cookies issue with v1.17.0 - When the script attempts to log in to the wiki, the error states: "CAGNWiki uses cookies to log in users. You have cookies disabled. Please enable them and try again." No changes have been made to the upload script. I've searched for similar posts on the MediaWiki support pages and have searched for different methods of using cookies in perl but haven't found a solution. I've included the commands used to use cookies in our script, if it helps. Thanks in advance for any tips!


use LWP; use HTTP::Request::Common; use HTTP::Cookies; my $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new);

Cagnwikiuser22:27, 3 February 2012

You need to request the login page, save the cookies and provide the username and password with the login token. There are some mediawiki frameworks which already take care of these details.

Alternatively, you can use the maintenance/importImages.php script on the server.

Platonides23:16, 3 February 2012
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox