Topic on Manual talk:Interwiki cache/Setup for your own wiki

interwiki.cdb does not exist

1
Tgr (WMF) (talkcontribs)

These days Wikimedia uses a plain PHP array intstead of a CDB file so the script fails when trying to fetch https://noc.wikimedia.org/conf/interwiki.cdb. As a workaround, create the file manually:

  1. download https://noc.wikimedia.org/conf/interwiki.php
  2. run mwscript shell.php to get a PHP shell
  3. $data = require .../interwiki.php;
  4. $cdb = \Cdb\Writer::open( '.../interwiki.cdb' );
  5. foreach ( $data as $key => $val ) $cdb->set( $key, $val );
  6. $cdb->close();
  7. You can run the Python script now.
Reply to "interwiki.cdb does not exist"