Mailing List Archive

Re: [Intlwiki-l] Moving intl wikis to the PHP script?
On mar, 2002-02-19 at 16:26, Jimmy Wales wrote:
> Brion Vibber wrote:
> > Jimbo, is there any chance we can move the Esperanto wikipedia over to
> > the PHP script soon? I've been promising people we'd be upgrading to the
> > new software (which will fix a number of annoying bugs in the old) for a
> > while, and the natives are getting restless. :)
>
> Yes!
>
> > I'm going to check in a couple more character set and case-conversion
> > fixes tonight, after which we should be ready anytime. At this point any
> > additional problems are only going to be discovered by having real users
> > bang at the real site with real non-English non-ISO-8859-1 text...
>
> How about this -- tomorrow morning, I will install this. Will you be around
> (in email) tomorrow for questions?

Sounds great! If I remember correctly, we are both on Pacific time
(UTC-8), yes?

> Best thing to do -- send me simple step by step instructions,
> including instructions about the conversion script. I'll back
> everything up, run the conversion, install the new software, and
> it'll work perfectly the first try! (ha ha!)

It's relatively simple (famous last words). For everybody's reference:

1. Edit convertWiki2SQL.php to set some options there. Right now it's a
little rough, eventually it may or may not get smoother. Basically,
uncomment the special settings for the target language, and set the
$rootDir variable to point to the "page" subdirectory of the usemod db
that the data is being sucked from.

2. Run "php convertWiki2SQL.php" as a user with write permission to the
wiki directory. This should spit out a bunch of article titles and
create a big file called "newiki.sql" which contains the SQL commands to
insert everything into the database. Note that it's normal to see a few
errors about not being able to open a directory -- that just means
there's a letter of the alphabet that no article titles start with.

3. Create the database. I've been calling my test database "wikieo", but
whatever sounds appropriate should work just as well. Something like:
mysql -e "create database wikieo;"
should do it if I recall correctly. You might also have to specify the
proper username and password, I don't know how you guys have mysql set
up.

4. Initialize the tables and enter the data. Something like:
mysql wikieo < wikipedia.sql
mysql wikieo < newiki.sql
(After this step "newiki.sql" shouldn't be necessary anymore.) I'm also
going to put together a file with SQL commands to fix some articles with
extra uppercase letters in the titles which you can run here:
mysql wikieo < titlefix.sql

5. Edit wikiLocalSettings.php to set the language and database name.
Roughly:
$wikiLanguage = "eo" ;
$wikiSQLServer = "wikieo" ;
and if the hostname isn't being automatically picked up:
$wikiCurrentServer = "http://eo.wikipedia.com" ;

In theory everything should automagically work after that... (Assuming
of course that the apache rewrite rules are set up properly, etc.)

> If it isn't working perfectly right out of the box, then I'll back out
> the change, revert to the Usemod script, and we'll do a dry run in a
> "safer" way with test.wikipedia.com or whatever.

Great, I'll warn the others. :)

-- brion vibber (brion @ pobox.com)