Open Steinsplitter opened 5 years ago
Works on trusty with php 5 but not on stretch with php7.
tools.sbot@tools-sgebastion-06:[~/Peachy/test]:` cat index.php <?php $homedir = "/data/project/sbot/Peachy/";
require( $homedir."Peachy/Init.php" );
$site = Peachy::newWiki( "commons" );
$site->set_runpage( null );
$title = "File:Test.svg";
$title2 = str_replace(" ", "_", $title);
$titlelocal = "Test.svg";
echo "\n\nTITLE UPLOAD:" . $title2 . "\n\nTITLELOCAL:" . $titlelocal . "\n\n"; $site->initImage( $title2 )->api_upload($titlelocal,'', "testupload", $watch = null, $ignorewarnings = true, $async = false ); $site->initPage( $title2 )->purge(); ?> tools.sbot@tools-sgebastion-06:[~/Peachy/test]: php index.php Checking for updates...
Peachy is up to date.
Loading Peachy (version 2.0 (alpha 8))...
Logging in to https://commons.wikimedia.org/w/api.php as SteinsplitterBot, using a saved login cookie
TITLE UPLOAD:File:Test.svg
TITLELOCAL:Test.svg
Getting image info for File:Test.svg...
Getting page info for File:Test.svg..
API Error...
Code: badupload_file Text: File upload parameter "file" is not a file upload; be sure to use "multipart/form-data" for your POST and include a filename in the "Content-Disposition" header.
Upload error...
Getting page info for File:Test.svg..
Upload function no longer works:
API Error...
Code: badupload_file Text: File upload parameter "file" is not a file upload; be sure to use "multipart/form-data" for your POST and include a filename in the "Content-Disposition" header.
Upload error...
This is happening on labs (stretch), on the old trusty system it works. Cannot reproduce.