Hi,
I have a little old and well used Mediawiki installation, which has to be migrated. The old installation is version 1.12.0 with php 5.1 and mysql 5.0. The new one is php 5.3.17 and mysql 5.5.31, I tried Mediawiki 1.24.1.
I dumped the database and copied the webserver directory of the wiki. The manual upgrade does not work for me. I got the following error:
# ./update.php PHP Fatal error: Cannot redeclare wfProfileIn() (previously declared in /srv/www/htdocs/wiki/includes/profiler/Profiler.php:47) in /srv/www/htdocs/wiki/includes/ProfilerStub.php on line 12
Even after I commented out any used extension in LocalSettings.php and deleting the extensions files.
After that I deleted the wiki dir on the new server in whole and extracted the tar again on the fresh dir. The installation assistant is starting and I connect to the database. Then this happens: The existing database is found.
#9 /srv/www/htdocs/wiki/includes/installer/WebInstaller.php(280): WebInstallerUpgrade->execute() #10 /srv/www/htdocs/wiki/mw-config/index.php(79): WebInstaller->execute(Array) #11 /srv/www/htdocs/wiki/mw-config/index.php(38): wfInstallerMain() #12 /srv/www/htdocs/wiki/mw-config/index.php5(26): require('/srv/www/htdocs...') #13 {main} Purging caches...done.
I can hit "next" as often as I want, the assistant is stuck. In error_log I find this:
PHP Notice: Uncommitted DB writes (transaction from DatabaseUpdater::doUpdates). in /srv/www/htdocs/wiki/includes/db/Database.php on line 4266, referer: http://rzhs165-neu/wiki/mw-config/index.php5?page=Upgrade
I really like to update/migrate the wiki installation. How to get over the occurred error?
Marc
On 2015-02-02 2:01 AM, Marc Patermann wrote:
Hi,
I have a little old and well used Mediawiki installation, which has to be migrated. The old installation is version 1.12.0 with php 5.1 and mysql 5.0. The new one is php 5.3.17 and mysql 5.5.31, I tried Mediawiki 1.24.1.
I dumped the database and copied the webserver directory of the wiki. The manual upgrade does not work for me. I got the following error:
# ./update.php PHP Fatal error: Cannot redeclare wfProfileIn() (previously declared in /srv/www/htdocs/wiki/includes/profiler/Profiler.php:47) in /srv/www/htdocs/wiki/includes/ProfilerStub.php on line 12
This is typically due to two things in combination: - You have an old StartProfiler.php you added that does a a require_once to a path of a file that no longer exists. - You extracted the tarball over top of your install instead of extracting it somewhere then moving stuff into that folder, meaning you have old files from your previous version of MediaWiki mixed in with the new files.
The result is that StartProfiler.php requires an old MediaWiki file that redefines things that are defined elsewhere in the current MediaWiki and gives you a cryptic error instead of telling you it's trying to require a file that shouldn't exist.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]
Daniel,
Daniel Friesen schrieb (02.02.2015 12:02 Uhr):
On 2015-02-02 2:01 AM, Marc Patermann wrote:
I have a little old and well used Mediawiki installation, which has to be migrated. The old installation is version 1.12.0 with php 5.1 and mysql 5.0. The new one is php 5.3.17 and mysql 5.5.31, I tried Mediawiki 1.24.1.
I dumped the database and copied the webserver directory of the wiki. The manual upgrade does not work for me. I got the following error:
# ./update.php PHP Fatal error: Cannot redeclare wfProfileIn() (previously declared in /srv/www/htdocs/wiki/includes/profiler/Profiler.php:47) in /srv/www/htdocs/wiki/includes/ProfilerStub.php on line 12
This is typically due to two things in combination:
- You have an old StartProfiler.php you added that does a a require_once
to a path of a file that no longer exists.
- You extracted the tarball over top of your install instead of
extracting it somewhere then moving stuff into that folder, meaning you have old files from your previous version of MediaWiki mixed in with the new files.
The result is that StartProfiler.php requires an old MediaWiki file that redefines things that are defined elsewhere in the current MediaWiki and gives you a cryptic error instead of telling you it's trying to require a file that shouldn't exist.
So what is your advice then? What file should be copied to the new system?
Marc
On 2015-02-02 6:45 AM, Marc Patermann wrote:
Daniel,
Daniel Friesen schrieb (02.02.2015 12:02 Uhr):
On 2015-02-02 2:01 AM, Marc Patermann wrote:
I have a little old and well used Mediawiki installation, which has to be migrated. The old installation is version 1.12.0 with php 5.1 and mysql 5.0. The new one is php 5.3.17 and mysql 5.5.31, I tried Mediawiki 1.24.1.
I dumped the database and copied the webserver directory of the wiki. The manual upgrade does not work for me. I got the following error:
# ./update.php PHP Fatal error: Cannot redeclare wfProfileIn() (previously declared in /srv/www/htdocs/wiki/includes/profiler/Profiler.php:47) in /srv/www/htdocs/wiki/includes/ProfilerStub.php on line 12
This is typically due to two things in combination:
- You have an old StartProfiler.php you added that does a a require_once
to a path of a file that no longer exists.
- You extracted the tarball over top of your install instead of
extracting it somewhere then moving stuff into that folder, meaning you have old files from your previous version of MediaWiki mixed in with the new files.
The result is that StartProfiler.php requires an old MediaWiki file that redefines things that are defined elsewhere in the current MediaWiki and gives you a cryptic error instead of telling you it's trying to require a file that shouldn't exist.
So what is your advice then? What file should be copied to the new system?
Marc
Delete StartProfiler.php.
Cleanup your installation by extracting the tarball to a different folder and then moving things like LocalSettings.php, images (but first move images/.htaccess from the tarball into your old images folder), extensions, and anything else you've customized into that folder.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]
On Mon, 02 Feb 2015 11:01:30 +0100, Marc Patermann hans.moser@ofd-z.niedersachsen.de wrote:
The existing database is found. #9 /srv/www/htdocs/wiki/includes/installer/WebInstaller.php(280): WebInstallerUpgrade->execute() #10 /srv/www/htdocs/wiki/mw-config/index.php(79): WebInstaller->execute(Array) #11 /srv/www/htdocs/wiki/mw-config/index.php(38): wfInstallerMain() #12 /srv/www/htdocs/wiki/mw-config/index.php5(26): require('/srv/www/htdocs...') #13 {main} Purging caches...done.
That looks like an exception traceback, but where are #1 to #8? All the interesting stuff would be in these items.
Bartosz Dziewoński schrieb (02.02.2015 16:27 Uhr):
On Mon, 02 Feb 2015 11:01:30 +0100, Marc Patermann hans.moser@ofd-z.niedersachsen.de wrote:
The existing database is found.
That looks like an exception traceback, but where are #1 to #8? All the interesting stuff would be in these items.
silly me *scrolling up the scroll bar* This is the complete message:
Turning off Content Handler DB fields for this part of upgrade. ...have ipb_id field in ipblocks table. ...have ipb_expiry field in ipblocks table. ...already have interwiki table ...indexes seem up to 20031107 standards. ...hitcounter table already exists. ...have rc_type field in recentchanges table. ...index new_name_timestamp already set on recentchanges table. ...user table does not exist, skipping new field patch. ...querycache table already exists. ...objectcache table already exists. ...categorylinks table already exists. ...have pagelinks; skipping old links table updates ...il_from OK ...have rc_ip field in recentchanges table. ...index PRIMARY already set on image table. ...have rc_id field in recentchanges table. ...have rc_patrolled field in recentchanges table. ...logging table already exists. ...user table does not exist, skipping new field patch. ...watchlist table does not exist, skipping new field patch.
An error occurred: Es ist ein Datenbankabfragefehler aufgetreten. Abfrage: SELECT count(*) FROM `watchlist` WHERE wl_namespace & 1 LIMIT 1 Funktion: MysqlUpdater::doWatchlistUpdate Fehler: 1146 Table 'wikidb.watchlist' doesn't exist (localhost)
Backtrace: #0 /srv/www/htdocs/wiki/includes/db/Database.php(1182): DatabaseBase->reportQueryError('Table 'wikidb.w...', 1146, 'SELECT count(*...', 'MysqlUpdater::d...', false) #1 /srv/www/htdocs/wiki/includes/db/Database.php(1650): DatabaseBase->query('SELECT count(*...', 'MysqlUpdater::d...') #2 /srv/www/htdocs/wiki/includes/db/Database.php(1360): DatabaseBase->select('watchlist', 'count(*)', 'wl_namespace & ...', 'MysqlUpdater::d...', Array) #3 /srv/www/htdocs/wiki/includes/installer/MysqlUpdater.php(392): DatabaseBase->selectField('watchlist', 'count(*)', 'wl_namespace & ...', 'MysqlUpdater::d...') #4 [internal function]: MysqlUpdater->doWatchlistUpdate() #5 /srv/www/htdocs/wiki/includes/installer/DatabaseUpdater.php(442): call_user_func_array(Array, Array) #6 /srv/www/htdocs/wiki/includes/installer/DatabaseUpdater.php(403): DatabaseUpdater->runUpdates(Array, false) #7 /srv/www/htdocs/wiki/includes/installer/DatabaseInstaller.php(307): DatabaseUpdater->doUpdates() #8 /srv/www/htdocs/wiki/includes/installer/WebInstallerPage.php(647): DatabaseInstaller->doUpgrade() #9 /srv/www/htdocs/wiki/includes/installer/WebInstaller.php(280): WebInstallerUpgrade->execute() #10 /srv/www/htdocs/wiki/mw-config/index.php(79): WebInstaller->execute(Array) #11 /srv/www/htdocs/wiki/mw-config/index.php(38): wfInstallerMain() #12 /srv/www/htdocs/wiki/mw-config/index.php5(26): require('/srv/www/htdocs...') #13 {main} Purging caches...done.
The error is: Table 'wikidb.watchlist' doesn't exist (localhost)
Marc
On Mon, Feb 2, 2015 at 7:43 AM, Marc Patermann hans.moser@ofd-z.niedersachsen.de wrote:
The error is: Table 'wikidb.watchlist' doesn't exist (localhost)
It sounds like your database dump is missing the watchlist table. Make a new dump and make sure the watchlist table is actually in there.
Benjamin,
Benjamin Lees schrieb (02.02.2015 23:41 Uhr):
On Mon, Feb 2, 2015 at 7:43 AM, Marc Patermann hans.moser@ofd-z.niedersachsen.de wrote:
The error is: Table 'wikidb.watchlist' doesn't exist (localhost)
It sounds like your database dump is missing the watchlist table. Make a new dump and make sure the watchlist table is actually in there.
Yes, thank you. The dump was extremely uncomplete. Now that it is about 180 MB, the database is completely migrated as it seems.
Marc
Hi,
Marc Patermann schrieb (02.02.2015 11:01 Uhr):
I have a little old and well used Mediawiki installation, which has to be migrated. The old installation is version 1.12.0 with php 5.1 and mysql 5.0. The new one is php 5.3.17 and mysql 5.5.31, I tried Mediawiki 1.24.1.
I got the database migrated by now.
The new situation is, that the Umlauts/die Umlaute äüö und ß in my wiki pages are broken.
The html on old an new is transfered as UTF-8: old: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> new: <html lang="de" dir="ltr" class="client-nojs"> <head> <meta charset="UTF-8" /> <title>Wiki der Systembereich IuK</title> <meta name="generator" content="MediaWiki 1.24.1" />
The database is the same type too: mysql> SELECT @@character_set_database, @@collation_database; +--------------------------+----------------------+ | @@character_set_database | @@collation_database | +--------------------------+----------------------+ | latin1 | latin1_swedish_ci | +--------------------------+----------------------+ 1 row in set (0.00 sec) new: mysql> SELECT @@character_set_database, @@collation_database; +--------------------------+----------------------+ | @@character_set_database | @@collation_database | +--------------------------+----------------------+ | latin1 | latin1_swedish_ci | +--------------------------+----------------------+ 1 row in set (0.00 sec)
LC_CTYPE=de_DE.UTF-8 is set on both servers.
I switched $wgDBTableOptions with no success.
How can I correct this?
Marc
I remember having had such a problem before, when migrating from 1.17 to 1.18
I made this not in our internal memeo:
30-jan-2012
We find that our wikidb is internally in latin1, and everything appears to be double encoded inside.
We arun into problems when other apps like adbedit access it.
To convert to utf8, we follow the steps in ttp://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
mysqldump -u root -pXXXXXX --opt --default-character-set=latin1 --skip-set-charset wikidb > wikidb_as80.sql
the next command is different from the instruction, we added 'i' to make it case independent. sed -e 's/character set latin1 collate latin1_bin/character set utf8 collate utf8_bin/ig' -e 's/CHARSET=latin1/CHARSET=utf8/ig' wikidb_as80.sql > wikidb_as80.sql.u8
Now the length of key strings can be too long: we do nothing for that
Then I login to mysql as root: mysql -u root -pXXXXXX mysql drop database wikidb; create database wikidb;
mysql -u root -pXXXXX --default-character-set=utf8 wikidb < wikidb_wwx.sql.u8
----- end memo note
When I run SELECT @@character_set_database, @@collation_database; now on wikidb, I get the same result as you have!
Internally, it still seems to have latin1. But I see no effects of that which cause any problems.
On 11.02.15 16:21, Marc Patermann wrote:
Hi,
Marc Patermann schrieb (02.02.2015 11:01 Uhr):
I have a little old and well used Mediawiki installation, which has to be migrated. The old installation is version 1.12.0 with php 5.1 and mysql 5.0. The new one is php 5.3.17 and mysql 5.5.31, I tried Mediawiki 1.24.1.
I got the database migrated by now.
The new situation is, that the Umlauts/die Umlaute äüö und ß in my wiki pages are broken.
The html on old an new is transfered as UTF-8: old:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> new: <html lang="de" dir="ltr" class="client-nojs"> <head> <meta charset="UTF-8" /> <title>Wiki der Systembereich IuK</title> <meta name="generator" content="MediaWiki 1.24.1" />
The database is the same type too: mysql> SELECT @@character_set_database, @@collation_database; +--------------------------+----------------------+ | @@character_set_database | @@collation_database | +--------------------------+----------------------+ | latin1 | latin1_swedish_ci | +--------------------------+----------------------+ 1 row in set (0.00 sec) new: mysql> SELECT @@character_set_database, @@collation_database; +--------------------------+----------------------+ | @@character_set_database | @@collation_database | +--------------------------+----------------------+ | latin1 | latin1_swedish_ci | +--------------------------+----------------------+ 1 row in set (0.00 sec)
LC_CTYPE=de_DE.UTF-8 is set on both servers.
I switched $wgDBTableOptions with no success.
How can I correct this?
Marc
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org