Topic on Project:Support desk

Jump to: navigation, search

[RESOLVED] Database error after installing latest version of Mediawiki

9
91.125.136.241 (talkcontribs)

Have just installed v.1.23.2 and imported a backed up database through phpMyAdmin. Also copied backed up images folder into new mediawiki folder. PhP is version 5.5.11, mySQL v.5.6.16. The original database and LocalSettings file were produced on mediawiki v.1.16. I have not copied the orginal local settings file over; instead I used the new LocalSettings file produced during new installation of 1.23. I am operating this on a localhost only. I now get the following error message:

A database query error has occurred. This may indicate a bug in the software.

   Query:
   SELECT page_id,page_namespace,page_title,page_restrictions,page_counter,page_is_redirect,page_is_new,page_random,page_touched,page_links_updated,page_latest,page_len,page_content_model FROM `mw_page` WHERE page_namespace = '0' AND page_title = 'Main_Page' LIMIT 1
   Function: WikiPage::pageData
   Error: 1054 Unknown column 'page_links_updated' in 'field list' (localhost)

Can anyone help me where I shoule start to look to solve the problem.

88.130.72.127 (talkcontribs)

When updating MediaWiki, please always follow the official Upgrade Guide! Additionally to the steps you did you e.g. willhave to update the database... ;-)

91.125.136.241 (talkcontribs)

Okay I have tried following the update guide, however I can't find anything on how to update the database. I ran update.php from the command prompt and received no messages. Where do I go from here?

Ciencia Al Poder (talkcontribs)

Do you mean that you ran php update.php and you received no output? That's a PHP error, then.

You should try the web updater (see Upgrade#Web_browser)

91.125.136.241 (talkcontribs)

I think I ran update.php! Under the maintenance directory in the command prompt I typed update.php and nothing happened except that the php file opened up. What am I supposed to do next? Thanks.

Ciencia Al Poder (talkcontribs)

What you did exactly?

Just typing update.php shouldn't do nothing on linux at least, since the file isn't executable. And it shouldn't do anything on windows neither, at least from the command prompt.

Be sure to call it after the php executable.

91.125.136.241 (talkcontribs)

I am operating windows 7 on my computer. Could you please explain what I need to do at the command prompt to run update.php, for example what does "call it after the php executable" mean? I am not computer savvy so please make the instructions very simple - no computer language! Thanks.

Ciencia Al Poder (talkcontribs)

You need first to locate the PHP command line program on your computer. It should be called php.exe but I'm not on your computer so I have no idea of where it may be (C:\ProgramFiles\PHP may be a good point to start looking at)

Then,

  1. open a command prompt
  2. go to the maintenance directory with the command prompt
    • CD "C:\Path\to\mediawiki\maintenance"
    (assuming C:\Path\to\mediawiki\maintenance is the maintenance directory under your mediawiki installation)
  3. run php, passing update.php as the first argument
    • "c:\path\to\php\php.exe" update.php
    (assuming c:\path\to\php\php.exe is the full path to php.exe)
Reply to "[RESOLVED] Database error after installing latest version of Mediawiki"