Extension:StackFunctions/Install


 * Ensure your PHP has multibyte functions enabled. If you do not have the possibility to do that, you might decide to do without multibyte support. In that case, just delete all occurences of "mb_" from StackFunctions.php.


 * Ensure your PHP is compiled with the mhash library which is needed to sign the serialized data with HMACs. If this is not possible to you, it is easy to patch the StackFunctions code to do without HMACs. However, this is strongly discouraged because anybody might upload serialzed PHP objects and use the __wakeup method to execute arbitrary PHP code on your server.


 * Unzip the distribution zipfile in the subdirectory extensions/StackFunctions of your mediawiki installation.

require_once( "extensions/StackFunctions/StackFunctions.php" );
 * Add the following line to your LocalSettings.php:


 * All parameters explained in the following must be set after this line.


 * Ensure $wgSecretKey is set in your LocalSettings.php. If you want to use something else to sign serialized code, set $wfStackFunctionsAuthKey to some random sequence of characters.

$wfStackFunctionsEnableQuery = true;
 * If you want to enable Extension:StackFunctions/Reference, also add the following line to your LocalSettings.php:


 * It is recommanded to set up a distinct tablespace for prologs. To do that, copy something like this to your LocalSettings.php:

define('NS_PROLOG', 200); define('NS_PROLOG_TALK', 201);
 * 1) extra namespace for StackFunctions Prologs

$wgExtraNamespaces = array( NS_PROLOG => "Prolog",  NS_PROLOG_TALK => "Prolog_Talk" );


 * By default, StackFunctions use gzdeflate</tt> with maximum compression to compress serialized code. If you want to use different compression functions and/or parameters, you may copy something like this to your LocalSettings.php</tt>:

$wfStackFunctionsCompress = 'gzcompress'; $wfStackFunctionsCompressArg = 1; $wfStackFunctionsDecompress = 'gzuncompress';