Jump to content

Help! Uploading mediawiki from my local host to a server


hazel1919

Recommended Posts

Hello all,

 

I am not sure if this is the correct catagory. Also, I am completely new to this scene, this is the first time I have ever attempted making a website, so thank you for your patience :) , so here goes...

 

I am designing a .org project that has an information website, forum (powered by phpBB) and wiki (mediawiki). I Installed the forum and mediawiki onto my localhost in order to work on them and add content. I then bought hosting from hostgator a couple of days ago in order to go live... great! I started first on the forum, so I transferred the files using Filezilla up to my server public_html. Finally I got the forum to work after editing the Config.php file: http://www.metalbot.org/forum

 

Next on my to do list was the wiki. So I essentially did the same thing and copied the wiki via Filezilla FTP straight into my public_html file on my server as 'wiki'. Great. So... first problem I ran into was needing to update my php version from 5.2 to 5.3 on the server. I think I did that correctly. But when I tried to access my website using the following address: www.metalbot.org/wiki it comes up with the following errors and wont let me view my wiki home page.

 

Warning: Invalid argument supplied for foreach() in /home/jethro/public_html/wiki/includes/objectcache/SqlBagOStuff.php on line 195

Warning: Invalid argument supplied for foreach() in /home/jethro/public_html/wiki/includes/objectcache/SqlBagOStuff.php on line 195
A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT page_title FROM `Wiki_page` WHERE page_is_redirect = '0' AND page_namespace = '8' AND (page_title NOT LIKE '%/%' ) AND (page_len > 10000)
Function: MessageCache::loadFromDB(en)-big
Error: 1146 Table 'jethro_metalbot.Wiki_page' doesn't exist (localhost)

 

 

Wonderfull! What does it mean? I have tried editing the code inside LocalSettings.php but I am not sure if this is correct.  From here I am stuck!

 

I have also tried to follow this guide http://www.mediawiki.org/wiki/Manual:Moving_a_wiki on moving a mediawiki from one server to another (I am assuming it does not matter if I am moving from local host to server, teh process is the same)... and I have a few questions.

 

I thought I had done steps 6 and 7:

 

  1. Import the MediaWiki files
  2. Check the configuration file

But clearly something is wrong. Looking down the page at "Update the configuration file" in the link above, there are a few things I would like to clear up...

 

  • I am assuming $wgServer would need to be my website address "www.metalbot.org"
  • $wgScriptPath apparently "Needs to match the public url to where the MediaWiki directory is on the new server" . In my case, this would be "public_html/wiki", correct?
  • $wgArticlePath: "Needs to match where wiki pages are now primarily read from. What does that mean? What do I do here???
  • $wgDBserver The hostname to the new database server. Should I just leave this as 'localhost'?
  • $wgDBname: I have made a database on the hostgator cpanel and called it jethro_metalbot, is this what I should put in?
  • $wgDBuser: My databse user name is also jethro_metalbot, is that what I should put in?
  • $wgDBpassword: This should just be my databse password right?

Here is the code for LocalSettings.php with my password taken out ;):

<?php
# This file was automatically generated by the MediaWiki 1.20.3
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php 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:
# http://www.mediawiki.org/wiki/Manual:Configuration_settings

# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
	exit;
}

## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename      = "MetalBot";

## 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:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath       = "/wiki";
$wgScriptExtension  = ".php";

## The protocol and server name to use in fully-qualified URLs
$wgServer           = "http://localhost";

## The relative URL path to the skins directory
$wgStylePath        = "$wgScriptPath/skins";

## The relative URL path to the logo.  Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo             = "$wgScriptPath/images/MetalBot.png";

## UPO means: this is also a user preference option

$wgEnableEmail      = true;
$wgEnableUserEmail  = true; # UPO

$wgEmergencyContact = "apache@localhost";
$wgPasswordSender   = "apache@localhost";

$wgEnotifUserTalk      = false; # UPO
$wgEnotifWatchlist     = false; # UPO
$wgEmailAuthentication = true;

## Database settings
$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "MetaBot_Wiki";
$wgDBuser           = "root";
$wgDBpassword       = "********";

# MySQL specific settings
$wgDBprefix         = "Wiki_";

# MySQL table options to use during installation or update
$wgDBTableOptions   = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;

## Shared memory settings
$wgMainCacheType    = CACHE_NONE;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads  = true;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";

# InstantCommons allows wiki to use images from http://commons.wikimedia.org
$wgUseInstantCommons  = false;

## 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.utf8";

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
#$wgHashedUploadDirectory = false;

## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";

# Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "en";

$wgSecretKey = "d9e7f7b7db5a734f02eafd9e67d2cbee693017433a645ee17cabb951d9b00673";

# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "aaa5653ac98d6490";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook', 'vector':
$wgDefaultSkin = "vector";

## 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 = "";

# Query string length limit for ResourceLoader. You should only set this if
# your web server has a query string length limit (then set it to that limit),
# or if you have suhosin.get.max_value_length set in php.ini (then set it to
# that value)
$wgResourceLoaderMaxQueryLength = -1;

# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['edit'] = false;


# End of automatically generated settings.
# Add more configuration options below.

If you have read this far, thank you! I have been struggling with this for a week now and would love to just get it working.

 

Have a great day!

 

Jethro.

Link to comment
Share on other sites

It looks like you only have one database, but both your forum and wiki sites should have a separate database. I would create a new database for the wiki. I'm not sure if it installs the database itself or if you import the tables, but if it's the former, it is likely skipping over that step since the database is NOT empty.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.