?php //require_once '/var/www/remainsoftware-live/wp-load.php'; // Load WordPress // error_reporting( -1 ); // ini_set( 'display_startup_errors', 1 ); // ini_set( 'display_errors', 1 ); // $wgShowExceptionDetails=true; // $wgDebugToolbar=true; // $wgShowDebug=true; // $wgDevelopmentWarnings=true; // $wgDebugDumpSql = true; // $wgDebugLogFile = '/tmp/debug.log'; // $wgDebugComments = true; // $wgEnableParserCache = false; // $wgCachePages = false; // $wgShowExceptionDetails = true; // error_reporting( -1 ); // ini_set( 'display_errors', 1 ); ini_set( 'memory_limit', '1024M' ); # This file was automatically generated by the MediaWiki 1.38.2 # installer. If you make manual changes, please keep track in case you # need to recreate them later. # # See docs/Configuration.md for all configurable settings # and their default values, but don't forget to make changes in _this_ # file, not there. # # Further documentation for configuration settings may be found at: # https://www.mediawiki.org/wiki/Manual:Configuration_settings # Protect against web entry if ( !defined( 'MEDIAWIKI' ) ) { exit; } ## Uncomment this to disable output compression # $wgDisableOutputCompression = true; $wgSitename = "Remain Software"; $wgMetaNamespace = "Remain_Software"; ## The URL base path to the directory containing the wiki; ## defaults for all runtime URL paths are based off of this. ## For more information on customizing the URLs # (like /w/index.php/Page_title to /wiki/Page_title) please see: ## https://www.mediawiki.org/wiki/Manual:Short_URL $wgScriptPath = "/wiki"; ## The protocol and server name to use in fully-qualified URLs $wgServer = "https://remainsoftware.com"; ## The URL path to static resources (images, scripts, etc.) $wgResourceBasePath = $wgScriptPath; ## The URL paths to the logo. Make sure you change this from the default, ## or else you'll overwrite your logo when you upgrade! $wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/wiki.png", 'icon' => "$wgResourceBasePath/resources/assets/wiki.png", ]; ## UPO means: this is also a user preference option $wgAllowExternalImages = true; $wgEnableEmail = true; $wgEnableUserEmail = true; # UPO $wgEmergencyContact = "apache@🌻.invalid"; $wgPasswordSender = "apache@🌻.invalid"; $wgEnotifUserTalk = false; # UPO $wgEnotifWatchlist = false; # UPO $wgEmailAuthentication = true; ## Database settings $wgDBtype = "mysql"; // $wgDBserver = "localhost"; // $wgDBname = "wiki128"; // $wgDBuser = "wpremainsoftware"; // $wgDBpassword = "wB}@bkKCF1^uqjsk@2-cBwr3"; $wgDBserver = "localhost"; $wgDBname = "wiki128"; $wgDBuser = "wpremainsoftware"; $wgDBpassword = "wB}@bkKCF1^uqjsk@2-cBwr3"; # MySQL specific settings $wgDBprefix = ""; # MySQL table options to use during installation or update $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary"; # Shared database table # This has no effect unless $wgSharedDB is also set. $wgSharedTables[] = "actor"; ## Shared memory settings # added wj 8/10/2025 $wgMainCacheType = CACHE_ACCEL; $wgSessionCacheType = CACHE_DB; # added wj 8/1/2017 # $wgMainCacheType = CACHE_NONE; # $wgSessionCacheType = CACHE_DB; ## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: $wgEnableUploads = true; $wgUseImageResize = true; #$wgUseImageMagick = true; #$wgImageMagickConvertCommand = "/usr/bin/convert"; ## If you use ImageMagick (or any other shell command) on a ## Linux server, this will need to be set to the name of an ## available UTF-8 locale $wgShellLocale = "en_US.UTF-8"; # InstantCommons allows wiki to use images from https://commons.wikimedia.org $wgUseInstantCommons = false; # Periodically send a pingback to https://www.mediawiki.org/ with basic data # about this MediaWiki instance. The Wikimedia Foundation shares this data # with MediaWiki developers to help guide future development efforts. $wgPingback = true; # Site language code, should be one of the list in ./languages/data/Names.php $wgLanguageCode = "en"; # Time zone $wgLocaltimezone = "UTC"; ## Set $wgCacheDirectory to a writable directory on the web server ## to make your wiki go slightly faster. The directory should not ## be publicly accessible from the web. $wgCacheDirectory = "$IP/cache"; $wgSecretKey = "c99123c1dc9dab2ba9e472c4c45791f78601b973469dac806cc5eb3662f036b6"; # Changing this will log out all existing sessions. $wgAuthenticationTokenVersion = "1"; # Site upgrade key. Must be set to a string (default provided) to turn on the # web installer while LocalSettings.php is in place $wgUpgradeKey = "2e3b101cde0d7043"; ## For attaching licensing metadata to pages, and displaying an ## appropriate copyright notice / icon. GNU Free Documentation ## License and Creative Commons licenses are supported so far. $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright $wgRightsUrl = ""; $wgRightsText = ""; $wgRightsIcon = ""; # Path to the GNU diff3 utility. Used for conflict resolution. $wgDiff3 = "/usr/bin/diff3"; ## Default skin: you can change the default skin. Use the internal symbolic ## names, e.g. 'vector' or 'monobook': $wgDefaultSkin = "vector"; # Enabled skins. # The following skins were automatically enabled: wfLoadSkin( 'apex' ); wfLoadSkin( 'Hidden' ); wfLoadSkin( 'BlueSky' ); wfLoadSkin( 'Bouquet' ); wfLoadSkin( 'CologneBlue' ); wfLoadSkin( 'DeskMessMirrored' ); wfLoadSkin( 'Dusk' ); wfLoadSkin( 'DuskToDawn' ); wfLoadSkin( 'erudite' ); wfLoadSkin( 'Example' ); wfLoadSkin( 'Gamepress' ); wfLoadSkin( 'GreyStuff' ); wfLoadSkin( 'HasSomeColours' ); wfLoadSkin( 'Mask' ); wfLoadSkin( 'Material' ); wfLoadSkin( 'Metrolook' ); wfLoadSkin( 'Modern' ); wfLoadSkin( 'MonoBook' ); wfLoadSkin( 'Nimbus' ); wfLoadSkin( 'Nostalgia' ); wfLoadSkin( 'Refreshed' ); wfLoadSkin( 'Schulenburg' ); wfLoadSkin( 'Splash' ); wfLoadSkin( 'Tempo' ); wfLoadSkin( 'Timeless' ); wfLoadSkin( 'Truglass' ); wfLoadSkin( 'Vector' ); wfLoadSkin( 'WoOgLeShades' ); wfLoadSkin( 'WPtouch' ); # The following extensions were automatically enabled: wfLoadExtension( 'AuthWP' ); # End of automatically generated settings. # Add more configuration options below. /** * RemainSection (WJ) */ $wgFileExtensions = array('mp4', 'png', 'gif', 'jpg', 'jpeg', 'ogg', 'jar', 'zip', 'exe', 'swf', 'pdf', 'txt', 'yml', 'json', 'docx', 'pptx', 'xlsx', 'pattern'); $wgAllowJavaUploads = true; $wgNamespacesWithSubpages[NS_MAIN] = true; /** Files with these extensions will never be allowed as uploads. */ $wgFileBlacklist = array( # HTML may contain cookie-stealing JavaScript and web bugs 'html', 'htm', 'js', 'jsb', # PHP scripts may execute arbitrary code on the server 'php', 'phtml', 'php3', 'php4', 'phps', # Other types that may be interpreted by some servers 'shtml', 'jhtml', 'pl', 'py', 'cgi', # May contain harmful executables for Windows victims 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ); # InstantCommons allows wiki to use images from https://commons.wikimedia.org $wgUseInstantCommons = false; $wgPageLanguageUseDB = true; # $wgTranslateUseDynamicGroups = true; $wgTranslateTranslationAids = [ 'current' => true, 'machine' => false, // Disable if not needed ]; # The following extensions were automatically enabled: wfLoadExtension('Translate'); wfLoadExtension( 'Babel' ); wfLoadExtension( 'cldr' ); wfLoadExtension( 'PdfHandler' ); wfLoadExtension( 'Renameuser' ); // load youtube extension wfLoadExtension( 'YouTube' ); ## Elastica Search wfLoadExtension( 'Elastica' ); wfLoadExtension( 'CirrusSearch' ); ## Setting to 10 seems to work for translations $wgJobRunRate = 10; $wgRunJobsAsync = true; $wgEnablePageTranslation = true; // Enable page translation feature $wgGroupPermissions['sysop']['pagetranslation'] = true; // Allow admins to mark pages for translation $wgSearchType = 'CirrusSearch'; $wgCirrusSearchServers = [ 'localhost' ]; $wgCirrusSearchIndexBaseName = 'wiki128'; // Set the index prefix $wgCirrusSearchMetastoreIndex = 'mw_cirrus_metastore_first'; // Set the correct metastore index $wgCirrusSearchConfig['index']['default']['analyzer']['tokenizer'] = 'whitespace'; // or custom tokenizer // Remove user rights $wgGroupPermissions['*'] = []; $wgGroupPermissions['user'] = []; $wgGroupPermissions['autoconfirmed'] = []; $wgGroupPermissions['autoconfirmed']['read'] = true; // Set user rights #$wgGroupPermissions['*']['edit'] = false; #$wgGroupPermissions['*']['editsemiprotected'] = false; #$wgGroupPermissions['*']['translate-manage'] = false; #$wgGroupPermissions['*']['translate'] = false; #$wgGroupPermissions['*']['pagetranslation'] = false; #$wgGroupPermissions['*']['translate-messagereview'] = false; #$wgGroupPermissions['*']['translate-groupreview'] = false; #$wgGroupPermissions['*']['translate-import'] = false; #$wgGroupPermissions['*']['pagetranslation'] = false; #$wgGroupPermissions['*']['createaccount'] = true; # Needed for AUTHWP #$wgGroupPermissions['*']['writeapi'] = false; $wgGroupPermissions['*']['read'] = true; # Needed for AUTHWP $wgGroupPermissions['*']['autocreateaccount'] = true; #$wgGroupPermissions['*']['createpage'] = false; #$wgGroupPermissions['user']['read'] = true; $wgGroupPermissions['authenticated user']['read'] = true; $wgGroupPermissions['remain_admin']['read'] = true; $wgGroupPermissions['remain_admin']['edit'] = true; $wgGroupPermissions['remain_admin']['Administrator'] = true; $wgGroupPermissions['remain_admin']['userrights'] = true; $wgGroupPermissions['remain_admin']['delete'] = true; $wgGroupPermissions['remain_employee']['delete'] = true; $wgGroupPermissions['remain_employee']['translate-manage'] = true; $wgGroupPermissions['remain_employee']['translate'] = true; $wgGroupPermissions['remain_employee']['pagetranslation'] = true; $wgGroupPermissions['remain_employee']['translate-messagereview'] = true; $wgGroupPermissions['remain_employee']['translate-groupreview'] = true; $wgGroupPermissions['remain_employee']['translate-import'] = true; $wgGroupPermissions['remain_employee']['changetags'] = true; # Add/remove arbitrary tags $wgGroupPermissions['remain_employee']['applychangetags'] = true; # Apply tags with edits $wgGroupPermissions['remain_employee']['createtalk'] = true; # Create talk pages $wgGroupPermissions['remain_employee']['createpage'] = true; # Create non-talk pages $wgGroupPermissions['remain_employee']['edit'] = true; # Edit pages $wgGroupPermissions['remain_employee']['editcontentmodel'] = true; # Edit content model $wgGroupPermissions['remain_employee']['editmyusercss'] = true; # Edit own user CSS $wgGroupPermissions['remain_employee']['editmyuserjson'] = true; # Edit own user JSON $wgGroupPermissions['remain_employee']['editmyuserjs'] = true; # Edit own user JS $wgGroupPermissions['remain_employee']['editmyuserjsredirect'] = true; # Edit own JS redirects $wgGroupPermissions['remain_employee']['minoredit'] = true; # Mark edits as minor $wgGroupPermissions['remain_employee']['move-categorypages'] = true; # Move category pages $wgGroupPermissions['remain_employee']['movefile'] = true; # Move files $wgGroupPermissions['remain_employee']['move'] = true; # Move pages $wgGroupPermissions['remain_employee']['move-subpages'] = true; # Move subpages $wgGroupPermissions['remain_employee']['move-rootuserpages'] = true; # Move root user pages $wgGroupPermissions['remain_employee']['reupload-shared'] = true; # Override shared repo files $wgGroupPermissions['remain_employee']['reupload'] = true; # Reupload existing files $wgGroupPermissions['remain_employee']['purge'] = true; # Purge cache $wgGroupPermissions['remain_employee']['read'] = true; # Read pages $wgGroupPermissions['remain_employee']['sendemail'] = true; # Send email to users $wgGroupPermissions['remain_employee']['upload'] = true; # Upload files $wgGroupPermissions['remain_employee']['writeapi'] = true; # Use write API # $wgGroupPermissions['distributor']['read'] = true; # $wgGroupPermissions['partner']['read'] = true; # $wgGroupPermissions['partner-plus']['read'] = true; # $wgGroupPermissions['customer']['read'] = true; # $wgGroupPermissions['customer-user']['read'] = true; $wgWhitelistRead = ['Special:UserLogin', 'Special:UserLogout', 'Main Page']; require_once 'extensions/Polyglot/Polyglot.php'; # End of automatically generated settings. # Add more configuration options below. //absolute path from web root require_once("extensions/redirectAfterLogout.php"); $wgEnableBotPasswords = true; //wiki page to redirect to (adjust path and page title) $wgPageToRedirectAfterLogout = "https://remainsoftware.com/"; $wgAllowExternalImages = true; $wgShowDBErrorBacktrace = true; wfLoadExtension( 'ReplaceText' ); $wgGroupPermissions['sysop']['replacetext'] = true; ### LANGUAGE TRANSLATION STUFF $EXT = "$IP/extensions"; $wgUploadPath = "$wgScriptPath/images"; $wgUploadDirectory = "$IP/images"; wfLoadExtension( 'LocalisationUpdate' ); $wgLocalisationUpdateDirectory = "$IP/cache"; $wgTranslateTranslationServices = array(); $wgTranslateTranslationServices['Microsoft'] = array( 'url' => 'http://api.microsofttranslator.com/V2/Http.svc/Translate', 'key' => null, 'timeout' => 3, 'type' => 'microsoft', ); $wgTranslateTranslationServices['TTMServer'] = array( 'type' => 'ttmserver', 'class' => 'ElasticSearchTTMServer', 'cutoff' => 0.75, /* * See http://elastica.io/getting-started/installation.html * See https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Client.php 'config' => This will be passed to \Elastica\Client */ ); $wgTranslateBlacklist = array( '*' => array( // All groups 'en' => 'English is the source language.', ), 'core' => array( // Exact group 'mul' => 'Not a real language.', ), 'ext' => array( // Wildcard-like group 'mul' => 'Not a real language', ), ); # $wgGroupPermissions['*']['translate'] = true; // or for 'user' # $wgGroupPermissions['translator']['translate'] = true; # $wgGroupPermissions['translator']['edit'] = true; # $wgGroupPermissions['translator']['read'] = true; # $wgGroupPermissions['translate-review']['translate-messagereview'] = true; # $wgGroupPermissions['translate-review']['translategroupreview'] = true; # $wgGroupPermissions['translate-import']['translate-import'] = true; # $wgGroupPermissions['translator']['pagetranslation'] = true; # $wgGroupPermissions['translate-review']['translate-review'] = true; # $wgGroupPermissions['translate-manager']['translate-manage'] = true; $wgTranslateDocumentationLanguageCode = 'qqq'; $wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages wfLoadExtension( 'UniversalLanguageSelector' ); $wgDebugLogFile = "/var/log/mediawiki-debug.log"; $wgShowExceptionDetails = true; $wgDevelopmentWarnings = true; $wgDebugLogGroups['Auth_remoteuser'] = '/var/log/mediawiki/Auth_remoteuser.log'; $wgHooks['BeforePageDisplay'][] = function( &$out, &$skin ) { $out->addHTML( '' ); return true; }; // $wgHooks['PersonalUrls'][] = 'onPersonalUrls'; // function onPersonalUrls( array &$personal_urls, Title $title, SkinTemplate $skin ) { // if(empty($_COOKIE['DRXtrArgs'])){ // $personal_urls['login-private']['href'] = "https://remainsoftware.com/user/login?destination=https://remainsoftware.com/wiki"; // }else{ // $personal_urls['logout']['href'] = "https://remainsoftware.com/user/logout"; // } // //Do stuff with $personal_urls // } Internal error - MediaWiki $wgServer must be set in LocalSettings.php. See https://www.mediawiki.org/wiki/Manual:$wgServer.