Talk:How to become a MediaWiki hacker

I think some detailed software component lists and version numbers would be useful for the target operational configuration and the "standard" development environment deemed best for neophytes.

More later after I read carefully and attempt some download and installation.

w:user:mirwin


 * version numbers have been addressed in the readme file at sourceforge w:user:mirwin

"You'll find cryptic instructions in the INSTALL file in the source. Try to follow them.

If you want to set up a local copy of the existing database to play with, first create an empty database with MYSQL and run the 'createdb.php' script in the 'maintenance' subdirectory (make sure it's configured appropriately!). Note that the maintenance scripts include files from the main source directory; either set up an include directory for PHP or just copy the files in."

Could someone please elaborate a little bit on this for someone who has never used PHP and MySQL before (and Apache only a few times)? More specific: mysqld and apache (with php4-module) are running (on MacOS 10.1.5) but I have no idea how to proceed from there. the wikipedia-software is in an subdirectory of my publicfolder (my test.php there is executed). mysqld is run as safe_mysqld by user "mysql". At the moment I get the following error:

"Warning: Failed opening 'Setup.php' for inclusion (include_path='.:/usr/lib/php') in /Users/elian/Sites/wikipedia/maintenance/createdb.php on line 6

Fatal error: Undefined class name 'title' in /Users/elian/Sites/wikipedia/maintenance/createdb.php on line 7"

What are the next steps to be done? What has do be configured now? --Elian


 * 1) Note that the maintenance scripts include files from the main source directory; either set up an include directory for PHP or just copy the files in. Simplest: copy everything in the 'maintenance' directory to the main source directory. Or, play with your php.ini and set up an include path.


 * I have no php.ini (this is macos x :-. The other solution worked.


 * 1) Create the database:
 * mysqladmin create wikidb #(You may need to use -u and -p options on mysql calls for root user)
 * (edit buildusers.sql to be have the desired database name, passwords)
 * mysql wikidb < buildusers.sql
 * 1) Set up the tables:
 * php createdb.php

Thanks, Brion. one step closer to the goal :-) wiki.phtml gets displayed now! There are some strange problems left (editing is possible in iCab but not in Mozilla and IE), but I try to solve them first alone ;-) --Elian

Everything works now except the upload of files. I suppose I have to tweak permissions a little bit. --Elian

Next question (sorry, just learning php, I have still some difficulties to understand the source code): update user set user_rights ='is_sysop' where user_name ='Test'; commit; but this change does not appear in the browser. What else do I have to add or to do? --Elian
 * How do I make a sysop? I tried:
 * How to switch everything to another language?

Sysops: it used to be "is_sysop" in phase II days, but now it's just "sysop". For developer access too (site locking, non-SELECT queries in the Asksql page), make it "sysop,developer".

Language: set the language code in LocalSettings.php, for instance for Esperanto:
 * $wgLanguageCode = "eo";

You'll probably also want to set the interwiki prefix if you're emulating or duplicating one of the per-language wikis:
 * $wgLocalInterwiki = "eo";

For Esperanto, Polish, Czech, Japanese, Korean, Chinese, Russian, or just for kicks, you'll want to configure it for utf-8 encoding also:
 * $wgInputEncoding       = "UTF-8";
 * $wgOutputEncoding      = "UTF-8";

To keep string functions like ucfirst from mis-munging utf-8 strings, I also set the locale:
 * setlocale(LC_ALL, "en_US.UTF-8");

I don't know if that's appropriate for non-Linux systems. Note that there should be some tweaks to the database configuration too, but we don't do them yet, so just ignore that for now. ;)

If you want to set up a language that doesn't have a LanguageXx.php file yet, make a stub one first! --Brion VIBBER 02:08 Nov 15, 2002 (UTC)

I am not {yet} a wikipedia hacker, but I have experience with Apache, PHP, Zope and ZWiki. I run a few ZWikis, frontended by Apache with mod_gzip enabled, which improves performance greatly, especially over high-latency or packet-lossy connections. Because most wiki pages are short plaintext, gzipped wiki pages can often be transmitted in 1 or 2 TCP/IP packets instead of many more for non-gzipped pages. A thought: if the wikipedia server has some CPU overhead, has anyone considered trying mod_gzip? -- Sydhart


 * Could be done... we could do this either with mod_gzip or PHP's gzip output filter (requires recompiling php with zlib support). About how much would this tend to affect CPU usage? --Brion VIBBER 04:40 Dec 10, 2002 (UTC)