<div dir="ltr"><div><div>Hi, <br><br></div>I have a local mediawiki installation and I'm trying to import the Nov 2016 en-wikipedia into it <br>(<a href="http://enwiki-20161101-pages-articles-multistream.xml.bz">enwiki-20161101-pages-articles-multistream.xml.bz</a>)<br><br><br></div><div>I'm using importDump.php, but the commands I try cause it to immediately fall over with an error message. When I do:<br><br>
<p class="gmail-code-western" lang="zxx">$ php importDump.php <
~/data/wikifork/enwiki-20161101-pages-articles-multistream.xml.bz2</p>
I get:<br><br>
<p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read():
uploadsource://405216067937ad302ddd05631e3ee446:1: parser error :
Document is empty in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 538</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read():
BZh91AY&SY<font style="font-size:12pt" size="3">귟</font>C
in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 538</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read(): ^
in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 538</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">[651d62f6f956c1552494dab7] [no
req] MWException from line 542 of
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php:
Expected <mediawiki> tag, got
</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">Backtrace:</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">#0
/home/phil/sproj/wikifork/mediawiki/maintenance/importDump.php(318):
WikiImporter->doImport()</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">#1
/home/phil/sproj/wikifork/mediawiki/maintenance/importDump.php(277):
BackupReader->importFromHandle(resource)</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">#2
/home/phil/sproj/wikifork/mediawiki/maintenance/importDump.php(108):
BackupReader->importFromStdin()</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">#3
/home/phil/sproj/wikifork/mediawiki/maintenance/doMaintenance.php(111):
BackupReader->execute()</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">#4
/home/phil/sproj/wikifork/mediawiki/maintenance/importDump.php(323):
require_once(string)</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">#5 {main}</span></p>
<br></div><div>And when I do:<br>
<p class="gmail-code-western" lang="zxx">$ php importDump.php --conf
../LocalSettings.php
~/data/wikifork/enwiki-20161101-pages-articles-multistream.xml.bz2
my_wiki</p><p class="gmail-code-western" lang="zxx">I get:<br></p><p class="gmail-code-western" lang="zxx"><br></p>
<p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read():
uploadsource://cd1f7162d36eda06a29d64becaf0b825:45: parser error :
Extra content at the end of the document in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 512</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read():
</siteinfo> in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 512</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read():
^ in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 512</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read():
Load Data before trying to read in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 603</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">PHP Warning: XMLReader::read():
Load Data before trying to read in
/home/phil/sproj/wikifork/mediawiki/includes/import/WikiImporter.php
on line 578</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">Done!</span></p><span style="font-family:monospace,monospace">
</span><p class="gmail-code-western" lang="zxx"><span style="font-family:monospace,monospace">You might want to run
rebuildrecentchanges.php to regenerate RecentChanges</span></p><span style="font-family:monospace,monospace"><br></span></div><div><br></div><div>I'm puzzled that I'm getting different error messages here.<br></div><div>
<div><div><br></div><div>Am I going down the wrong track entirely and need to use mwdumper?<br></div><div><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Phil Hunt, <<a href="mailto:cabalamat@gmail.com" target="_blank">cabalamat@gmail.com</a>><br><img src="https://docs.google.com/uc?export=download&id=0B6nGW7nkBxxrdWppS0V3N2VRak0&revid=0B6nGW7nkBxxrcXpQSWtIc3A0bU1pWU92b08yV3NySHRlcnV3PQ"><br></div></div></div>
</div></div></div></div>