<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.phpgedview.net/en/index.php?action=history&amp;feed=atom&amp;title=User_talk%3ALaurie%2FInstall</id>
	<title>User talk:Laurie/Install - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.phpgedview.net/en/index.php?action=history&amp;feed=atom&amp;title=User_talk%3ALaurie%2FInstall"/>
	<link rel="alternate" type="text/html" href="https://wiki.phpgedview.net/en/index.php?title=User_talk:Laurie/Install&amp;action=history"/>
	<updated>2026-04-29T23:11:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.phpgedview.net/en/index.php?title=User_talk:Laurie/Install&amp;diff=10017&amp;oldid=prev</id>
		<title>Laurie: /* CommonSettings.php */</title>
		<link rel="alternate" type="text/html" href="https://wiki.phpgedview.net/en/index.php?title=User_talk:Laurie/Install&amp;diff=10017&amp;oldid=prev"/>
		<updated>2008-03-04T03:28:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;CommonSettings.php&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[User talk:Laurie|Please make any comments or suggestions to this here, as this page is protected.]] &lt;br /&gt;
&lt;br /&gt;
==Base system==&lt;br /&gt;
Web Host Settings&lt;br /&gt;
*PHP Installed 5.2.1&lt;br /&gt;
*MySQL Installed 5.0.45-community &lt;br /&gt;
*Apache 1.3.37 (Unix)&lt;br /&gt;
&lt;br /&gt;
==Directory Structure==&lt;br /&gt;
Running on domain name - wiki.phpgedview.net&lt;br /&gt;
&lt;br /&gt;
So as to run multiple Wiki's using the following directory structure&lt;br /&gt;
&lt;br /&gt;
 Root Directory of Web Site&lt;br /&gt;
 Index html &amp;amp; index.htm - Menu page for various language wikis&lt;br /&gt;
 /             &lt;br /&gt;
&lt;br /&gt;
 Directory structure and files for Mediawiki installation&lt;br /&gt;
 /w                    Base installation directory&lt;br /&gt;
 All mediawiki files placed here with exception of:-&lt;br /&gt;
     index.php&lt;br /&gt;
     images (directory)&lt;br /&gt;
&lt;br /&gt;
 Various Language Wikis are setup with this structure using language code as directory name (xx)&lt;br /&gt;
 /xx                    directory named according to language code &lt;br /&gt;
 /xx/images             Image files for wiki&lt;br /&gt;
 /xx/index.php&lt;br /&gt;
 All remaining files and directories are linked to w via symbolic links&lt;br /&gt;
&lt;br /&gt;
==Mediawiki==&lt;br /&gt;
Version 1.11.1 installed in base directory of /w&lt;br /&gt;
&lt;br /&gt;
Symbolic links created for all directories and files to /w from root&lt;br /&gt;
 ln -s ../w/file.or.directory.name file.or.directory.name&lt;br /&gt;
&lt;br /&gt;
==Databases==&lt;br /&gt;
Running one database for all wiki's.  Prefix used for each language  eg.&lt;br /&gt;
 en_      prefix for English&lt;br /&gt;
 da_      prrfix for Danish&lt;br /&gt;
&lt;br /&gt;
===Database Security===&lt;br /&gt;
Included the following line in CommonSettings.php.  As this file is outside the website it is more secure as passwords are not included in the file.&lt;br /&gt;
 require_once(&amp;quot;/fullpath/external_to_websites/wiki_password_file_name.php&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Changed the following lines in LocalSettings.php so that working with variables and not real usernames/passwords&lt;br /&gt;
 $wgDBuser           = $db_user;&lt;br /&gt;
 $wgDBpassword       = $db_password;&lt;br /&gt;
&lt;br /&gt;
Created relevant directory and file that is being called&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
   $wgDBuser = &amp;quot;    &amp;quot;;   //Username goes in here&lt;br /&gt;
   $wgDBpassword = &amp;quot; &amp;quot;;  //Password for user goes in here&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==LocalSetting.php==&lt;br /&gt;
The majority of this file has been moved to CommonSettings.php to allow consitency across all wikis.  Language code is different for each wiki and used as a variable in CommonSettings.php.  File then calls CommonSettings.php for processing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
# Use This area for items that need to be configured for each language&lt;br /&gt;
$wgLanguageCode = &amp;quot;en&amp;quot;;             // Language Code for Wiki &lt;br /&gt;
$googleAnalytics = &amp;quot;UA-1339101-8&amp;quot;;  // Code for Google Analytics&lt;br /&gt;
&lt;br /&gt;
# All settings come from the CommonSettings.php File&lt;br /&gt;
include_once( &amp;quot;../w/CommonSettings.php&amp;quot; );&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CommonSettings.php==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
## Language Code saved as variable in case reset before being defined.&lt;br /&gt;
$wgLanguageCodeTemp = &amp;quot;&amp;quot;;&lt;br /&gt;
$wgLanguageCodeTemp .= $wgLanguageCode;&lt;br /&gt;
&lt;br /&gt;
# This file was automatically generated by the MediaWiki installer.&lt;br /&gt;
# If you make manual changes, please keep track in case you need to&lt;br /&gt;
# recreate them later&lt;br /&gt;
#&lt;br /&gt;
# See includes/DefaultSettings.php for all configurable settings&lt;br /&gt;
# and their default values, but don't forget to make changes in _this_&lt;br /&gt;
# file, not there.&lt;br /&gt;
&lt;br /&gt;
# If you customize your file layout, set $IP to the directory that contains&lt;br /&gt;
# the other MediaWiki files. It will be used as a base to locate files.&lt;br /&gt;
if( defined( 'MW_INSTALL_PATH' ) ) {&lt;br /&gt;
$IP = MW_INSTALL_PATH;&lt;br /&gt;
} else {&lt;br /&gt;
$IP = dirname( __FILE__ );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$path = array( $IP, &amp;quot;$IP/includes&amp;quot;, &amp;quot;$IP/languages&amp;quot;);&lt;br /&gt;
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );&lt;br /&gt;
&lt;br /&gt;
require_once( &amp;quot;includes/DefaultSettings.php&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
# If PHP's memory limit is very low, some operations may fail.&lt;br /&gt;
# ini_set( 'memory_limit', '20M' );&lt;br /&gt;
&lt;br /&gt;
if ( $wgCommandLineMode ) {&lt;br /&gt;
if ( isset( $_SERVER ) &amp;amp;&amp;amp; array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {&lt;br /&gt;
die( &amp;quot;This script must be run from the command line\n&amp;quot; );&lt;br /&gt;
}&lt;br /&gt;
} elseif ( empty( $wgNoOutputBuffer ) ) {&lt;br /&gt;
## Compress output if the browser supports it&lt;br /&gt;
if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Reintroduce LanguageCode from Variable&lt;br /&gt;
$wgLanguageCode = &amp;quot;&amp;quot;;&lt;br /&gt;
$wgLanguageCode .= $wgLanguageCodeTemp;&lt;br /&gt;
&lt;br /&gt;
# Buildup $IP based on language code&lt;br /&gt;
$IP = &amp;quot;/home/mydigita/public_html/pgvwiki-website/&amp;quot;;&lt;br /&gt;
$IP .= $wgLanguageCode;&lt;br /&gt;
&lt;br /&gt;
## The URL base path to the directory containing the wiki;&lt;br /&gt;
## defaults for all runtime URL paths are based off of this.&lt;br /&gt;
## Build script path from language code&lt;br /&gt;
$wgScriptPath = &amp;quot;/&amp;quot;;&lt;br /&gt;
$wgScriptPath .= $wgLanguageCode;&lt;br /&gt;
&lt;br /&gt;
$wgSitename = &amp;quot;PGVWiki&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Build up images locations&lt;br /&gt;
$wgUploadPath = &amp;quot;$wgScriptPath/images&amp;quot;;&lt;br /&gt;
$wgUploadDirectory = &amp;quot;$IP/images&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
## For more information on customizing the URLs please see:&lt;br /&gt;
## http://www.mediawiki.org/wiki/Manual:Short_URL&lt;br /&gt;
&lt;br /&gt;
$wgEnableEmail = true;&lt;br /&gt;
$wgEnableUserEmail = true;&lt;br /&gt;
&lt;br /&gt;
$wgEmergencyContact = &amp;quot;pgvwiki@mydigitalhome.com.au&amp;quot;;&lt;br /&gt;
$wgPasswordSender = &amp;quot;pgvwiki@mydigitalhome.com.au&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
## For a detailed description of the following switches see&lt;br /&gt;
## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent&lt;br /&gt;
## There are many more options for fine tuning available see&lt;br /&gt;
## /includes/DefaultSettings.php&lt;br /&gt;
## UPO means: this is also a user preference option&lt;br /&gt;
$wgEnotifUserTalk = true; # UPO&lt;br /&gt;
$wgEnotifWatchlist = true; # UPO&lt;br /&gt;
$wgEmailAuthentication = true;&lt;br /&gt;
&lt;br /&gt;
# Get passwords from outside of website for secutiry reasons&lt;br /&gt;
require_once(&amp;quot;../../../external_to_websites/pgvwiki/pgvwiki_passwords.php&amp;quot;);&lt;br /&gt;
$wgDBtype = &amp;quot;mysql&amp;quot;;&lt;br /&gt;
$wgDBserver = &amp;quot;localhost&amp;quot;;&lt;br /&gt;
$wgDBname = &amp;quot;mydigita_pgvwiki&amp;quot;;&lt;br /&gt;
$wgDBuser = $db_user;&lt;br /&gt;
$wgDBpassword = $db_password;&lt;br /&gt;
$wgDBport = &amp;quot;5432&amp;quot;;&lt;br /&gt;
## Build database prefix&lt;br /&gt;
$wgDBprefix = &amp;quot;&amp;quot;;&lt;br /&gt;
$wgDBprefix .= $wgLanguageCode;&lt;br /&gt;
$wgDBprefix .= &amp;quot;_&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Schemas for Postgres&lt;br /&gt;
$wgDBmwschema = &amp;quot;mediawiki&amp;quot;;&lt;br /&gt;
$wgDBts2schema = &amp;quot;public&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# Experimental charset support for MySQL 4.1/5.0.&lt;br /&gt;
$wgDBmysql5 = false;&lt;br /&gt;
&lt;br /&gt;
## Shared memory settings&lt;br /&gt;
$wgMainCacheType = CACHE_NONE;&lt;br /&gt;
$wgMemCachedServers = array();&lt;br /&gt;
&lt;br /&gt;
## To enable image uploads, make sure the 'images' directory&lt;br /&gt;
## is writable, then set this to true:&lt;br /&gt;
$wgEnableUploads = true;&lt;br /&gt;
$wgUseImageResize = true;&lt;br /&gt;
$wgUseImageMagick = true;&lt;br /&gt;
$wgImageMagickConvertCommand = &amp;quot;/usr/bin/convert&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
## If you want to use image uploads under safe mode,&lt;br /&gt;
## create the directories images/archive, images/thumb and&lt;br /&gt;
## images/temp, and make them all writable. Then uncomment&lt;br /&gt;
## this, if it's not already uncommented:&lt;br /&gt;
# $wgHashedUploadDirectory = false;&lt;br /&gt;
&lt;br /&gt;
## If you have the appropriate support software installed&lt;br /&gt;
## you can enable inline LaTeX equations:&lt;br /&gt;
$wgUseTeX = false;&lt;br /&gt;
&lt;br /&gt;
$wgLocalInterwiki = $wgSitename;&lt;br /&gt;
&lt;br /&gt;
$wgProxyKey = &amp;quot;08a24d4a13d2f543bbd7e70efa5a9cd24b1a9c50f5f43b95389d9fb8535c06d4&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
## Default skin: you can change the default skin. Use the internal symbolic&lt;br /&gt;
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':&lt;br /&gt;
$wgDefaultSkin = 'monobook';&lt;br /&gt;
&lt;br /&gt;
## For attaching licensing metadata to pages, and displaying an&lt;br /&gt;
## appropriate copyright notice / icon. GNU Free Documentation&lt;br /&gt;
## License and Creative Commons licenses are supported so far.&lt;br /&gt;
# $wgEnableCreativeCommonsRdf = true;&lt;br /&gt;
$wgRightsPage = &amp;quot;&amp;quot;; # Set to the title of a wiki page that describes your license/copyright&lt;br /&gt;
$wgRightsUrl = &amp;quot;&amp;quot;;&lt;br /&gt;
$wgRightsText = &amp;quot;&amp;quot;;&lt;br /&gt;
$wgRightsIcon = &amp;quot;&amp;quot;;&lt;br /&gt;
# $wgRightsCode = &amp;quot;&amp;quot;; # Not yet used&lt;br /&gt;
&lt;br /&gt;
$wgDiff3 = &amp;quot;/usr/bin/diff3&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
# When you make changes to this configuration file, this will make&lt;br /&gt;
# sure that cached pages are cleared.&lt;br /&gt;
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );&lt;br /&gt;
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );&lt;br /&gt;
&lt;br /&gt;
# This snippet prevents editing from anonymous users&lt;br /&gt;
$wgGroupPermissions['*']['edit'] = false;&lt;br /&gt;
$wgLogo = &amp;quot;/pgv_logo.png&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Add ons==&lt;br /&gt;
===Spam Prevention===&lt;br /&gt;
&lt;br /&gt;
To add Spamblacklist downloaded files from [http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/SpamBlacklist/#dirlist here] (use the &amp;quot;download&amp;quot; link for each file), it also includes a  [http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/SpamBlacklist/README?only_with_tag=MAIN&amp;amp;view=markup readme file] with detailed instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the files were downloaded I then edited SpamBlacklist_body making the following changes for compatability with 1.5.3.  Lines with - removed.  Lines with + added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- SpamBlacklist_body.php?rev=1.11     2005-10-17 17:25:14.000000000 -0400&lt;br /&gt;
+++ SpamBlacklist_body.php      2005-10-17 17:34:45.000000000 -0400&lt;br /&gt;
@@ -59,7 +59,7 @@&lt;br /&gt;
                        if ( !$recache ) {&lt;br /&gt;
                                $this-&amp;gt;regex = $wgMemc-&amp;gt;get( &amp;quot;spam_blacklist_regex&amp;quot; );&lt;br /&gt;
                        }&lt;br /&gt;
-                       if ( !$this-&amp;gt;regex ) {&lt;br /&gt;
+                       if ( !$this-&amp;gt;regex || $this-&amp;gt;regex == 1 ) {&lt;br /&gt;
                                # Load lists&lt;br /&gt;
                                $lines = array();&lt;br /&gt;
                                wfDebug( &amp;quot;Constructing spam blacklist\n&amp;quot; );&lt;br /&gt;
@@ -132,12 +132,9 @@&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        function getArticleLines( $db, $article ) {&lt;br /&gt;
-               $dbr = wfGetDB( DB_READ );&lt;br /&gt;
-               $cur = $dbr-&amp;gt;tableName( 'cur' );&lt;br /&gt;
-               $res = $dbr-&amp;gt;query( &amp;quot;SELECT cur_text FROM $db.$cur WHERE cur_namespace=0 AND cur_title='$article'&amp;quot; );&lt;br /&gt;
-               $row = $dbr-&amp;gt;fetchObject( $res );&lt;br /&gt;
+                $row = wfMsgForContent($article);&lt;br /&gt;
                if ( $row ) {&lt;br /&gt;
-                       return explode( &amp;quot;\n&amp;quot;, $row-&amp;gt;cur_text );&lt;br /&gt;
+                       return explode( &amp;quot;\n&amp;quot;, $row );&lt;br /&gt;
                } else {&lt;br /&gt;
                        return array();&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Added Spamblacklist to bottom of CommonSettings.php&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Spam Blacklist&lt;br /&gt;
require_once( &amp;quot;$IP/extensions/SpamBlacklist/SpamBlacklist.php&amp;quot; );&lt;br /&gt;
$wgSpamBlacklistFiles = array(&lt;br /&gt;
        &amp;quot;$IP/extensions/SpamBlacklist/blacklist&amp;quot;, // Wikimedia's list&lt;br /&gt;
&lt;br /&gt;
//          database    title&lt;br /&gt;
        &amp;quot;DB: pgvwiki   en:Mediawiki:Spamblacklist&amp;quot;,&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following line has also been added to stop the insertion of Spam hidden in html code&lt;br /&gt;
&lt;br /&gt;
  $wgSpamRegex=&amp;quot;/overflow:\s*auto/&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
===Virus Detection===&lt;br /&gt;
ClamAV already installed on server.  Following added to CommonSettings.php&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# AntiVirus Settings&lt;br /&gt;
$wgAntivirus = &amp;quot;clamav&amp;quot; ;&lt;br /&gt;
$wgAntivirusRequired = true ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will work in line with file uploads.  At this time only graphic files can be uploaded.&lt;/div&gt;</summary>
		<author><name>Laurie</name></author>
		
	</entry>
</feed>