Can anyone tell me exactly what I'm supposed to do with line 2. of this set of instructions:
Installation
1. Download the extension and unpack it in the extensions directory.
2. Source GlobalUsage.sql: php maintenance/sql.php extensions/GlobalUsage/GlobalUsage.sql
Note: do this from the wiki installation where you want the GlobalUsage data to be located. Typically this is your shared image repository. Running update.php on that wiki will also create the table.
3. Edit LocalSettings.php and add to the bottom of the file: require_once( "$IP/extensions/GlobalUsage/GlobalUsage.php" );
4. In LocalSettings, set $wgGlobalUsageDatabase to the identifier of the wiki where the GlobalUsage data is located (usually the database name). It should be something understandable to wfGetDB. Example: $wgGlobalUsageDatabase = 'commonswiki';
At present, this can NOT be a database name of a wiki, but must be a name given in a load balancer configuration: Manual:$wgLBFactoryConf, a complex and largely undocumented configuration structure used by the WMF and Wikia. For a normal mediawiki setup using multiple databases configuring and maintaining this data structures implies significant difficulties.
5. Run refreshGlobalimagelinks.php on all wikis in your farm. This will take a long time. php extensions/GlobalUsage/refreshGlobalimagelinks.php
6. Visit Special:GlobalUsage and enjoy.
On 30/03/12 15:49, John W. Foster wrote:
Can anyone tell me exactly what I'm supposed to do with line 2. of this set of instructions:
Installation
Download the extension and unpack it in the extensions directory.
Source GlobalUsage.sql: php maintenance/sql.php
extensions/GlobalUsage/GlobalUsage.sql
Note: do this from the wiki installation where you want the GlobalUsage data to be located. Typically this is your shared image repository. Running update.php on that wiki will also create the table.
Where are your doubts? There's a script in maintenance/sql.php. You run it using php with the command line, thus php maintenance/sql.php It gets the file with sql statements as a parameter. If you're at the wiki root, the script is at maintenance subfolder and the extension at extensions/GlobalUsage. Thus you run:
php maintenance/sql.php extensions/GlobalUsage/GlobalUsage.sql
mediawiki-l@lists.wikimedia.org