Extension talk:Farmer

Hello, I installed Farmer but now I cannot see anything when I go to my wiki. I installed farmer extension thru SVN.

There is something wrong with the $wgFarmerSettings. I used ais_ as the defaultwiki. the prefix separator is "_". Should I use ais or ais_.

I am at dead end. Please help.

RegExp examples
Can anyone provide some regexp examples for using with matchRegExp and matchOffset?

Error with $wgFarmerSettings
$wgFarmerSettings['wikiIdentifierFunction'] = array('MediaWikiFarmer', '_matchByURLHostname'); This delivers on startup of default wiki
 * I prefer Localsettings.php with

Warning: Missing argument 1 for MediaWikiFarmer::_matchByURLHostname in \extensions\Farmer\MediaWikiFarmer.php on line 281

$wgFarmerSettings['wikiIdentifierFunction'] = array('MediaWikiFarmer', '_matchByServerName'); This delivers on creating new wiki
 * I tested Localsettings.php with

Warning: Invalid argument supplied for foreach in \extensions\Farmer\MediaWikiFarmer.php on line 434


 * Can you help me to get one of both to work?

Environment and Setting

 * OS: Win 2000
 * 1) MediaWiki: 1.11alpha (r22753)
 * 2) PHP: 5.1.1 (apache2handler)
 * 3) MySQL: 5.0.18

--Wissenslogistiker 14:18, 7 June 2007 (UTC)

Non-shared user and user_groups
does Farmer support non-shared user and user_groups databases yet ?
 * Seems not for now.--FR6 20:20, 14 May 2007 (UTC)

Updating wiki source
What happens when you update the wiki source code? Will all necessary configurations of all the wiki installs be updated? Or will this still have to be done manually? --Denise 11:41, 3 April 2007 (UTC)

I don't understand What they mean
I am a Chinese. I don't understand what the followed mean:
 * 1) "MediaWiki trunk", which mentioned in the section "mysql_errno.28.29_fix" is what? Can I find the explain(s) of it in somewhere?
 * 2) The section tall me "You need to change this to read: if ( $this->lastErrno ) {", I'v checked the Database.php but I still don't know how do I follow the instruction ?

Please tall me, Thanks!

Environment and Setting
--Roc michael 04:32, 13 May 2007 (UTC)
 * OS: Win XP
 * 1) Mediawiki Version 1.9.2
 * 2) Apache Web Server Version 2.2.3
 * 3) PHP Script Language Version 5.1.6
 * 4) MySQL Database Version 5.0.24a

How to use the patch?
What is the description "Farmer currently requires my patch to work correctly" mean in the section "Shared_Tables"? I've check the link my patch. In the other end of the link is a file which I don't know what the type of the file is. It isn't a ".php" file. Does it can be executive on Win XP or by firefox? How do I use it?

Please tall me, Thanks!

Environment and Setting
--Roc michael 04:32, 13 May 2007 (UTC)
 * OS: Win XP
 * 1) Mediawiki Version 1.9.2
 * 2) Apache Web Server Version 2.2.3
 * 3) PHP Script Language Version 5.1.6
 * 4) MySQL Database Version 5.0.24a


 * See Subversion. I suggest that you use TortoiseSVN for aplying a patch from Windows. --FR6 20:26, 14 May 2007 (UTC)

Error on creating new wiki
I get the following error when I try to create a new wiki under farmer.

Anyone have any ideas on how to fix this problem?

Also once I try to create the wiki again it says that it already exists. Where is is getting that information. I tried looking in to the config directory but did not see it.

Update
Looking at the sql code and error messages it looks like the error is in the daughterwiki.sql file. The column that is requested in here is not actually created by the sql file.

To fix this I added

When I fixed this I tried to create another wiki it showed that two more table were not even created. The two tables that were not created where redirect and page_restrictions

Once I added these two tables to the sql code I was able to create a working wiki. Not sure if I am going to run in to other problems later. If I find anything else I will post it here

Additional Information:
This note is from somebody who had similar problems updating his Wiki:

I found I had the exact same errors. Mine occurred when I upgraded to MySQL 5.0.45 AFTER I had already (successfully) upgraded from MediaWiki 1.9 to 1.11. However by re-executing the php update.php in the maintenance directory I found it added a whole bunch of stuff that it did not add the first time I ran it under MySQL4. When I re-executed it under MySQL5 it fixed all the problems that I was having.

Hope that helps anyone else who happened on this page by searching for the rev_len issue. ~ Mark

Doesn't work for me
This didn't work for me, for some reason, even after I set the variables, when doing a test installation on localhost, and on my webhost - freeunlimitedweb.com

I tried configuring the settings, but nothing worked properly.

By the way, I'm running the latest version of MediaWiki (trunk) from SVN, and the trunk version of this extension, so why has this gone wrong?? --84.45.219.185 08:59, 30 July 2008 (UTC)

Database error
hi

i am working with mediwiki-1.11

i install the Farmer extension but showme this error when i create a new wiki

Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "Revision::insertOn". MySQL returned error "1054: Unknown column 'rev_len' in 'field list' (localhost)".

what is the problem?

you can help me?

thanks

--200.77.227.68 18:40, 8 August 2008 (UTC)

Error
Fatal error: Call to undefined function wfMsgHtml in extensions/Farmer/MediaWikiFarmer.php on line 112

What did i forget to do?

Its Debian 4.0 etch Apache 2.2.3 PHP 5.2.0-8 MySQL 5.0.32 Mediawiki 1.14alpha SVN rveision 43190

Any ideas? And I'm confused about what to do with the patch.

Gewt 14:37, 4 November 2008 (UTC)

Using multiple Databases for one wiki
I had the idea to use two databases or more for one wiki. The databases should be shared with other wikis. For example, each wiki has it's very own database for common articles but one database which is shard with other wikis for templates. So it would be possible to share and maintain templates with other wikis without using interwikis which are not very comfortable because of the prefix and some other reasons. --Danwe 21:28, 30 April 2009 (UTC)

Renaming mw tables for use with Farmer
You may want to mention a PHP script to help renaming the MySQL tables. Not all phpmyadmin are set-up properly with PMA enabled and therefore it would become a manual action of individually renaming 35+ tables, with someone bound to go wrong.

daughterwiki.sql is missing in v1.15.x
According to the documentation, this extension also provides a file called daugtherwiki.sql, however it's not present in release 1.15.x. I notice it is present if I download an earlier version. Can I use the file from an older version? I've checked the subversion source repository, it not present anymore in the trunk. Where can I find the latest version? --85.91.175.221 09:38, 30 June 2009 (UTC)

daughterwiki.sql is missing in v1.15.x and Unknown column 'rev_len' in 'field list'- solved
it seems if you use tables.sql in the maintenance folder (of MediaWiki) it will work.

Here's my experience installing this extension
On a new mediawiki 1.15 installation, running on sub domain... I was writing instructions as I went for future times when I need to do this (I don't think there will be a second time).


 * 1) Install mediawiki (with PREFIX!)
 * 2) Decide on hosting strategy (I choose URL Prefix)
 * 3) Download your version of Farmer from here http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Farmer
 * 4) Upload the .tar.gz to the /extensions/ directory and unzip it (a /Farmer/ folder will be created)
 * 5) Add this code snippet to the bottom of /LocalSettings.php

require_once( 'farmer/Farmer.php' ); $wgFarmer = new MediaWikiFarmer( $wgFarmerSettings ); $wgFarmer->run;


 * 1) Add some configuration (you may as well do this in the previous step)

require_once( 'extensions/Farmer/Farmer.php' ); $wgFarmerSettings['defaultWiki'] = 'wiki'; # without the prefix separator apparently $wgFarmerSettings['wikiIdentifierFunction'] = array( 'MediaWikiFarmer', '_matchByServerName' ); $wgFarmerSettings['dbAdminUser'] = 'MYDBUSER'; $wgFarmerSettings['dbAdminPassword'] = 'MYPASSWORD'; $wgFarmerSettings['dbTablePrefixSeparator'] = '_'; $wgFarmerSettings['newDbSourceFile'] = realpath( dirname( __FILE__ ) ). '/extensions/Farmer/daughterwiki.sql'; $wgFarmer = new MediaWikiFarmer( $wgFarmerSettings ); $wgFarmer->run;


 * 1) Add a /configs/ directory to the /extensions/Farmer/ directory and set it to 777
 * 2) Access the homepage to install Farmer (make sure /configs/ is writable)
 * 3) * You may need to wait a bit and do a full refresh
 * 4) Go to Special:Allmessages
 * 5) Login as WikiSysop and create the pages for "farmerwikiurl" and "farmerinterwikiurl", seting the values to

http://wiki.MYDOMAIN.com/$1 and http://wiki.MYDOMAIN.com/$1/$2


 * 1) Go to Special:Farmer to set some settings ("Bad things happen unless you do this")
 * 2) Try creating a new wiki via the admin tool
 * 3) * It might say daughterwiki.sql is missing (it was missed in the 1.15 distribution, download it from 1.14)
 * 4) Try fixing the errors it spits out...

THIS INSTALLATION IS A PIECE OF SHIT AND SO ARE THE INSTRUCTIONS (but thanks for some free software and sorry about my frustration)

3 hours later.... I give up, but the next step would be to go through and try all those config variables and see if you can find one that's necessary that was never listed in the example and hence has not been set properly.

No success
Did not manage to get Farmer running. I get the farmer page on the wiki and I can create wikis. This is done on Mediawiki 1.15.3. For this version I adapted daughterwiki.sql from an earlier version. The problem I have that the generated links lead to file not found error.I decided to use URL Prefix Hosting Strategy. Any ideas? --Dramtix 07:45, 28 May 2010 (UTC)

Please fix
This extension is majorly broken, could the dev look into it? PseudoOne 19:17, 17 October 2010 (UTC)