Manual talk:Upgrading/Archive 1

Where do you come from?
I realy miss the clear description whether or not you may upgrade from earlier versions of MW than the predecessor of the announced version. To give an example: I was asked by a customer: Can I upgrade from version 1.9 directly to the newest MW version? and being not well educated in MW my self, I had no proper reaction to make.

Are there restrictions? What restrictions may exist when you have a lot of Extensions installed? OK I accept that you have to find out for each extentention whether or not it supports the version to be installed. But nevertheless a warining for that should be in place here.

Again, may experience on this subject is too low to make changes myslef so please make soma improvements on this subject in the page if you can. JanEnEm 06:46, 25 April 2010 (UTC)


 * Great! Tim Starling did me (and others I hope) the favor introducing a FAQ section that amongst others answers the subject I raised here. Thanks Tim! JanEnEm 18:34, 5 May 2010 (UTC)

update.php
Could someone please explain how to run the update.php file using ssh. I am on a local MAMP server and I have been looking around for two hours online for a simple explanation as to how to navigate and run commands using terminal. "CD" doesn't seem to work. Someone should make a wiki with that info. Thank you! 24.130.249.87 21:51, 26 February 2012 (UTC)


 * What exactly happens, if you try using cd? We won't be able to fix a "does not seem to work".
 * Use
 * cd wiki/maintenance
 * or cd ../path/to/the/foldername-with-my-wiki-in-it/maintenance or something like that to bring you to the maintenance folder. Then run
 * php update.php
 * This is the way to go. If it's a local machine where you have direct access to the files (e.g. using a file commander or so) you could also navigate to the maintenance folder there and run the file update.php by double clicking on it (make sure it is associated to the PHP executable and Apache and MySQL are running). --88.130.80.237 12:11, 26 March 2012 (UTC)

Fatal error upgrading from 1.17.0 to 1.18.2: Call to a member function getDbType on a non-object in maintenance/doMaintenance.php on line 91
When trying to update from 1.17.0 to the latest (1.18.2 at the moment of writing this), I encountered this message:

Fatal error: Call to a member function getDbType on a non-object in maintenance/doMaintenance.php on line 91

The update script has garbled DB and I had to restore both files from 1.17.0 and DB to have the site back.

Does anyone know how to handle this strange behaviour? There are no modified files in my Mediawiki installation. Does it mean I can't upgrade without completely re-installing the site ab initio?

Boyandin (talk)


 * You should extract the 1.18.2 source code into a new folder. Then move your LocalSettings.php and the folders images/, extensions/ and skins/ there as well and try from there. MW 1.18 has problems, if there are left overs from an older version. (But I think the Upgrading page says that as well.) --88.130.80.237 12:04, 26 March 2012 (UTC)

Upgrade from 1.7 to 1.19 left the wiki open for edits to anyone
I upgraded aging install that had trouble after upgrade of php to 5.3 and after that all pages were editable by anyone without login. This should be noted in the upgrade instructions.
 * I guess this is caused by a misconfiguration in LocalSettings.php. Maybe the format of the according settings also changed sometime between 1.7 and 1.19; if this is the case I think this is already documented nicely. --88.130.97.249 01:59, 25 July 2012 (UTC)

Alternatives a mission impossible?
If an user have only HTML and FTP access, and "If I install new version of MW (1.15=> 1.16), will a DB update automatically??? No. You have to run Update.php" it's an mission impossible to udate a wiki? --Lastwebpage 17:41, 2 April 2011 (UTC)


 * You can update a wiki without shell access (SSH). To do that extract the new files on your PC and upload them via FTP. New versions of MediaWiki come with a web updater in my-domain.com/path-to-wiki/mw-config/index.php. Then run this web updater with your browser. This allows you to update the database with your webbrowser. --88.130.87.85 15:34, 18 September 2012 (UTC)

undefined function mysql_error
I have a problem with upgrading my local wiki from v 1.15.1 to the newest one. I've been following the instructions and while trying to run update.php all I got was only this:

MediaWiki 1.17.0 Updater

PHP Fatal error: Call to undefined function mysql_error in XXXXXXX\wiki\i ncludes\db\DatabaseMysql.php on line 234

Unfortunately I'm stuck at this point. How can I solve it? Please help me.

PS: Part of path is removed due to privacy. 178.183.191.232 22:30, 8 July 2011 (UTC)


 * EDIT Fixed the problem myself. I had to change extension of old LocalSettings.php file, then recreate new one using setup creator and after typing login and password to my own little database I could upgrade.
 * 178.183.191.232 22:51, 8 July 2011 (UTC)


 * NOTE: This error message is a sign that the extension php_mysql.dll is not loaded. I had this while migrating to a new version on a new server which had only php_pdo_mysql.dll enabled. You should check your php.ini/ phpinfo if you get this error.

PHP Fatal error DatabaseMysql.php on line 305
I am trying to install Extension:AbuseFilter

MySQL : 5.1.60

php_version:	5.3.12

nginx/1.0.14

root@zoglun:/wiki/maintenance# php update.php MediaWiki 1.19.0 Updater PHP Fatal error: Call to undefined function mysql_error in /wiki /includes/db/DatabaseMysql.php on line 305

--Zoglun (talk) 22:29, 29 July 2012 (UTC)


 * I received the same error message as Zoglun--also referring to line 305--after having run update.php during ConfirmAccount extension set-up. I'm not sure what to do, or how serious a problem this is.  I'd like to learn more, or fix the problem, if by chance anyone can provide a detailed explanation.  Like, what is that mysql_error function supposed to do?


 * VERSION INFO -
 * MediaWiki 1.19.1, PHP 5.3.8 (apache2handler), MySQL 5.5.16


 * ERROR MESSAGE -
 * MediaWiki 1.19.1 Updater Fatal error: Call to undefined function mysql_error in ... includes/db/DatabaseMysql.php on line 305


 * --Magic Sands


 * I'm also receiving the same error trying to run update.php after installing the TitleKey extension.
 * MediaWiki 1.19.2, PHP 5.4.4 (apache2handler), MySQL 5.5.25a
 * --wiiittttt


 * If you have MySQL enabled, mysql_error will be defined 100% of the time (unless it is disabled through the disable_functions PHP directive but I doubt that is the case).
 * So it sounds like the MySQL extension is not loaded. Are you sure you are using PHP5.3 or 5.4? It is possible that you have another PHP versions, when you run a script from the shell than when you call the wiki with your browser. Some hosters have the PHP5 executables available on the shell as "php5". You could try running "php5 update.php".
 * If you are running a PHP version, which should work, but get this error anyway, MySQL needs to be enabled in php.ini. --88.130.87.85 15:47, 18 September 2012 (UTC)

No Display Skin after upgrade 1.15.4 to 1.19.1
www.waihekepedia.org

After runnning the tarball extract, update.php and renaming profiler the site comes up without a theme and no side panels or tab layout.

Including the new vector.php in local settings has no effect. The logo that was pathed doesn't apear and changing the $wglogo to a known path makes no change, no visible logo. Its as if the default skin is completley blank.

Any ideas please ?
 * Please check your $wgServer value. If it is not www.waihekepedia.org then you need to change it to that.--Jasper Deng (talk) 22:03, 22 August 2012 (UTC)

Thanks for the early reply, I set $wgServer to the URL directly in Localsettings, its there now, no difference. I found this thread http://www.mwusers.com/forums/archive/index.php/t-17498.html but its about the monOskin, and 1.19 uses vector apparently. I'm actually quite confused about where to put the side bar and other eidts as some are appearing just below the wiki iteslf, but no wiki tabs to me is an issue apart form the side bar and other extensions such as googlemaps that arent appearing either..


 * I had these same symptoms after migrating to another server, and it was caused by bad permissions on the 'load.php' file (couldn't have group write permissions). I got the clue from the server error log - it's definitely worth checking the error logs for this. Kyloma (talk) 04:38, 18 December 2012 (UTC)


 * I have described that error on page Manual:Load.php. See there! --88.130.77.56 04:43, 26 January 2014 (UTC)

Command Line
I'm a complete novice at this. I've placed all the new files onto the server in the correct folders etc, all I need to do is run the update. I doesn't work using the web method, so the only other method is via the Command Line. For the love of god, why doesn't this thing tell me where to FIND this command line, because I can't find one anywhere. Where am I meant to be looking?


 * The commandline is a kind of "interface" to your server. There are several ways to communicate with a server. When you say that you uploaded all the MediaWiki files to the server, you most probably did that using FTP. Another way to communicate with your server might be not via FTP, but via SSH. An SSH connection is not offered by all hosting providers; possibly you do not have SSH access available. If SSH is offered, then this is an alternative way to connect to your server. If your home PC, from which you are working right now, runs MS Windows, you need an additional tool to use SSH. This tool is called Putty. With Putty you can then connect to your server using SSH. Then you will see the command line.


 * Usually the command line looks like a small black window with some white text in it. In the last line there is a blinking cursor and there you can type commands, which are then executed. So if you connect to your server via SSH, you can then run commands directly on the server. You type them in this small black window and they are executed on your server.


 * PS I have just added according hints to the page. :-) --88.130.102.160 13:47, 25 November 2012 (UTC)

"you need to migrate your wiki to a hosting account that does have shell access"
Ah, so casually stated.

This is simply not an option for many, and hopefully is a last resort rather only after all other options have failed. I would hazard that the majority of hosting services do not provide shell access, and with good reason. Also, the majority of wikimedia "administrators" are not techies or developers - to them wikimedia is just another app like Word or Wordpress, and this also is as it should be. In depth technical knowledge should not be required for something as simple as upgrading an application.

If the web interface has limitations, it would be good to at least to attempt to spell those out in detail: Of course there are many variables, but any clues at all would help. Roughly how big is too big? What do you measure to at least get an estimate? How to get around this if you are worried that it might be a problem? I.e., "Go into cpanel, Go to PHP Settings and and set your max_execution_time to ???" if that's what would help (I'm totally just guessing). If running as a cron job is an option, say so, and spell out how. If there are reasons this will not work, let people know.

I don't know the answers myself or I would write these hints. But "you need to migrate your wiki" strikes me as a lot less than helpful.


 * I have updated the page accordingly, however, in the situation described on the page there is no way around using SSH: If you have a big wiki and a poor host, then it's just likely that things don't work as expected. The web updater is just not made for you then. Yes, it would work, also with big databases, but to get it working, you will need to adjust some PHP settings, like the maximum execution time. Which shared hoster, which does not even give you shell access, will allow you to do so? Maybe when you pay extra, but why don't you instead pay to get reasonable hosting - including SSH access? That would solve you way more problems. Btw: A few versions ago, there was no web updater at all. You were just forced to use SSH in any case. If you didn't have it, you could just not update at all. Compared to this, the current situation is a vast improvement, don't you think? --88.130.90.136 11:49, 4 July 2013 (UTC)

Updating a file
After updating a file in my wiki, do I have to run update, in order that the change will be active?


 * What do you mean by updating a file? Do you mean editing a PHP file? In that case, no, you don't need to run update.php. That script is for schema changes --Ciencia Al Poder (talk) 10:11, 5 April 2014 (UTC)
 * update.php only needs to be run after you installed something in your wiki: That can be a new MediaWiki version or a new extension. In case of a MediaWiki update, you need to run update.php after a major update (like from 1.22 to 1.23). When you did a minor update (like from 1.22.6 to 1.22.7), then you do not need to run update.php. However, the article already says that. --88.130.89.88 10:45, 25 April 2014 (UTC)