Topic on Project:Support desk

PHP and Mysql was upgraded on my server and now I get a blank white page.

8
74.65.140.238 (talkcontribs)

PHP and Mysql was upgraded on my server and now I get a blank white page.

I was running an older version of Media Wiki, because the newer version did not work with my version of php.

The upgrades were: php 5.1.6 to 5.3 mysql 5.0.77 to 5.1

I can't even load the Wiki to see the version number.

Is it possible to upgrade to the latest version of Media Wiki and then import the old database information?

thank you!

88.130.86.84 (talkcontribs)

You did not tell us your MediaWiki version number. ;-) You always could do an update of MediaWiki, but right now I wouldn't. I would advice you to not change even more things (which might break even more stuff). Instead you should try to understand, which problem you have right now. Activate the PHP error log and see what it tells you after you tried to visit some pages in your wiki. With this info you can check, what makes sense as the next step.

74.65.140.238 (talkcontribs)

Can you please tell me how can I find my MediaWiki version number if I can't get the site to load?

can you tell me which file to look in?

thank you so much!

74.65.140.238 (talkcontribs)

here is the error message:


Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in /var/www/vhosts/eastwindstrust.org/httpdocs/includes/Namespace.php on line 46

74.65.140.238 (talkcontribs)
88.130.86.84 (talkcontribs)

Hi,

the MediaWiki version number is in the file includes/DefaultSettings.php on your webserver. Somewhere at the beginning of this file there is a variable definition: $wgVersion = ... That's the version you have.

Before you are doing any of the below it might be wise to make sure that you have a backup of your MediaWiki installation.

On that page in the small boxes you see what the blog author typed on the command line. The word "nano" in front of "Namespace.php" is the command to open the file Namespace.php with the programme "nano", which is an editor. If you want to proceed with what the blog author does, you can just open this file with an editor and modify it as he writes: Go to line 46, change the following from:

class Namespace {

to:

class MWNamespace {

Then you would still have to take the other steps, which he has there. There he is basically replacing all occurences of the word "Namespace" with "MWNamespace" inside the "includes" directory.

However, according to the error you get, it is caused by your MediaWiki version being to old. Your version does not work with PHP 5.3. Most probably this MediaWiki version also has known security holes, which you should fix anyway. So it would also make sense to do an update of MediaWiki, instead of fixing all these errors by hand. However, this might lead you to getting even more errors in the time when you try to get it running again with a new version. But it would bring you on the save side security wise.

74.65.140.238 (talkcontribs)

I am running version 1.6.10.

is there any way to do a clean install of the newest version and import my old database?

I'd like to get the content out of our old wiki, but if it's too much trouble we can just start fresh.

We really only had 15 or so pages of content.

Is there any way to get this old content out of the database? I would be happy to be able to cut and paste the text from my pages into a new install of the latest version!

thanks for your help!

88.130.86.84 (talkcontribs)

Hi again,

the page Installation contains a walk through on how to set up a new installation of MediaWiki.

If it is only about the pages (not about uploaded files or MediaWiki extensions), which you want to keep, then you can go through the installation instructions. When you are in the installer, where it asks you for a database name, enter a name of an empty database. Then complete installation. You will get an empty new Wiki.

Now two possible ways of getting your data back:

  • Extract it out of your old database manually and save it in your new wiki. See one of the first sections on Manual:Page_table for a way how to locate the current versions of the text on your pages.
  • The second possibility is to now change the database name and the database password in LocalSettings.php so that it points to the database from your old wiki (= the one with your old pages in it). Then the new wiki will use your old database. Run the web updater to update this old database to the new layout.

After one of these processes you should have a new wiki with your old content in it.

Reply to "PHP and Mysql was upgraded on my server and now I get a blank white page."