Forums | Mahara Community
Support
/
Upgrade Problem 1.1.1 using MySQL 5.1.32
21 March 2009, 19:57
Hi - there's no easy way to export data and import it again, unfortunately.
One question for you - did you try the upgrade, have it fail, and then continue using that same database? Because if you did, that will make things quite complicated - your site will be using a 'half upgraded' database, and in those situations it's not surprising that you'd be seeing strange behaviour like you described.
For the record (especially for others reading this thread who are having similar issues) - the best thing to do, when using MySQL and the upgrade fails, is to restore immediately from your backup, file a bug report with us with as much detail as you can find, and wait for a fix before trying the same process again.
23 March 2009, 10:47
Here's how I've been working: the main live installation of Mahara is on our Moodle server, in a folder called "mahara". It uses a database called "mahara1". To test the upgrade, I install Mahara 1.1.0, 1.1.1, or 1.1.2 (as the case may be, I tried each of them many times) in a new folder--currently mahara112a. Then I create a new database called mahara112, and import all the structure and data from the working database (mahara1) into mahara 112. I've been using a GUI MySQL program called Navicat to do the data transfer. Then I make a new config.php in the folder mahara112a, and point it to the database mahara112 (it also points to the existing maharadata folder). Then I navigate to the home page of the new folder (http://courses.miad.edu/mahara112), where I get the message that says "The site is temporarily closed for a database upgrade. Perform the upgrade now."
The basic upgrade process described above worked perfectly going from 1.0.8 to 1.0.9, and took about an hour.
But now I click the Perform the upgrade now link, and get the error:
Failed to get a recordset: mysql error: [1451: Cannot delete or update a parent row: a foreign key constraint fails ("mahara112"."mah_view_artefact", CONSTRAINT "mah_viewarte_art_fk" FOREIGN KEY ("artefact") REFERENCES "mah_artefact" ("id"))] in adodb_throw(DELETE FROM "mah_artefact" WHERE "id" = '248' , ) Command was: DELETE FROM "mah_artefact" WHERE "id" = ? and values was (248)
For readability's sake, I'll post the entire error log separately.
I have never attempted to run the update on the main working database, but only on clones. (At least I'm 99% sure; I can never exclude entirely the possibility of me making a stupid mistake!) I am also 99% sure that the problems with the current 1.0.9 installation have not been caused by these upgrade attempts; instead, I believe they were discovered because we've been looking very closely at the Mahara installation during the past few weeks. The fact that the upgrade fails on a particular record (and not the first record in the mah_view_artefact table) suggests to me that we might be dealing with an orphan record or a corrupt record. Is that possible?
23 March 2009, 10:50
Here's the complete upgrade sequence from the apache error log:
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:163) GROUP TYPE REFACTOR
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group SLAIN (1)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 37 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Singularity and Multiplicity (2)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is course
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being tutors
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 25 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group TEST Singularity and Multiplicity.deleted.1236101190 (3)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 25 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group TEST Casting and Carving (4)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is course
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being tutors
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 48 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Casting and Carving Fall 2008 (5)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is course
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being tutors
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 25 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Wood and Metal Construction Fall 2008 (6)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is course
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being tutors
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 25 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group ISA240 Fall 2008 (7)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 123 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group ISA 241 (8)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 311 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Visual Dynamics 2 T/T 12:30 - 3:20 (9)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 373 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Visual Dynamics 2 T/T 3:30 - 6:20 (10)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 373 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Foundations - Honors Group (11)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 360 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group test.deleted.1233702045 (12)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 360 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Test group (13)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 2 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Construction: Metal & Wood Spring 2009.deleted.1236099503 (14)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is course
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being tutors
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 14 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Construction: Metal & Wood Spring 2009.deleted.1236099625 (15)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is course
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being tutors
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 14 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Wood & Metal Construction Spring 2009 (16)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is course
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being tutors
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 25 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group ISA_2009 (17)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 417 as having the admin role
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:174) Migrating group Powersports ID Students (18)
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:185) * new group type is standard
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:222) * marked appropriate users as being members
[Mon Mar 23 09:25:22 2009] [error] [DBG] f5 (lib/db/upgrade.php:212) * marked user 322 as having the admin role
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:636)
rename(/Library/WebServer/maharadata/artefact/internal/profileicons,/Library/WebServer/maharadata/artefact/file/profileicons) [function.rename]: Directory
not empty
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("rename(/Library/WebServer/maharadata/artefact/inte...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 636) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "rename(/Library/WebServer/maharadata/artefact/inte...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 636, array(size 31)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * rename("/Library/WebServer/maharadata/artefact/internal/pr...",
"/Library/WebServer/maharadata/artefact/file/profil...") at /Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:636
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/11/11
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 33)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/18/18
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/44/44
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/50/50
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/73/73
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/94/94
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/102/102
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/109/109
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/116/116
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/123/123
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/125/125
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/133/133
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/173/173
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/195/195
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/207/207
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/231/231
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/238/238
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/db/upgrade.php:642) filesize() [function.filesize]: stat failed for
/Library/WebServer/maharadata/artefact/file/profileicons/originals/248/248
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("filesize() [function.filesize]: stat failed for /L...", 8, true, true,
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642) at /Library/WebServer/Documents/mahara112a/lib/errors.php:378
[Mon Mar 23 09:25:32 2009] [error] * error(2, "filesize() [<a href='function.filesize'>function.f...",
"/Library/WebServer/Documents/mahara112a/lib/db/upg...", 642, array(size 34)) at Unknown:0
[Mon Mar 23 09:25:32 2009] [error] * filesize("/Library/WebServer/maharadata/artefact/file/profil...") at
/Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:642
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/errors.php:663) Failed to get a recordset: mysql error: [1451: Cannot delete or update a parent row: a
foreign key constraint fails ("mahara112"."mah_view_artefact", CONSTRAINT "mah_viewarte_art_fk" FOREIGN KEY ("artefact") REFERENCES "mah_artefact" ("id"))]
in adodb_throw(DELETE FROM "mah_artefact" WHERE "id" = '248' , )
[Mon Mar 23 09:25:32 2009] [error] [WAR] f5 (lib/errors.php:663) Command was: DELETE FROM "mah_artefact" WHERE "id" = ? and values was (248)
[Mon Mar 23 09:25:32 2009] [error] Call stack (most recent first):
[Mon Mar 23 09:25:32 2009] [error] * log_message("Failed to get a recordset: mysql error: [1451: Can...", 8, true, true) at
/Library/WebServer/Documents/mahara112a/lib/errors.php:90
[Mon Mar 23 09:25:32 2009] [error] * log_warn("Failed to get a recordset: mysql error: [1451: Can...") at
/Library/WebServer/Documents/mahara112a/lib/errors.php:663
[Mon Mar 23 09:25:32 2009] [error] * SQLException->__construct("Failed to get a recordset: mysql error: [1451: Can...") at
/Library/WebServer/Documents/mahara112a/lib/dml.php:894
[Mon Mar 23 09:25:32 2009] [error] * delete_records("artefact", "id", "248") at /Library/WebServer/Documents/mahara112a/lib/db/upgrade.php:648
[Mon Mar 23 09:25:32 2009] [error] * xmldb_core_upgrade("2008040220") at /Library/WebServer/Documents/mahara112a/lib/upgrade.php:271
[Mon Mar 23 09:25:32 2009] [error] * upgrade_core(object(stdClass)) at /Library/WebServer/Documents/mahara112a/admin/upgrade.json.php:71
[Mon Mar 23 09:25:32 2009] [error]
23 March 2009, 16:47
Hi Dave,
This looks like it's failing to move the profileicon directory around inside the maharadata folder. (One of the things that happens in the upgrade is that artefact/internal/profileicons is moved to artefact/file/profileicons)
I'm not sure why that happened, but when testing upgrades you should definitely use a copy of maharadata, not the original. We have probably failed to stress that, but it's really as important as using a copy of the database.
One possibility is that a previous upgrade attempt has already moved the profileicons directory to artefact/file/, and then the old site (running the old 1.0 code) has continued to put new icons into artefact/internal/profileicons, so you might want to see if you have files in both places now.
If that's the case, to restore the old data, you probably want to copy everything back from under artefact/file/profileicons to artefact/internal/profileicon, but only if they don't already exist in artefact/internal/profileicons, i.e. don't overwrite any files. The ones under artefact/internal will probably be newer, but they will be an incomplete set.
Then next time you try the upgrade, make a full copy of the maharadata folder (this will probably take a while), and make sure config.php in your new code directory points to this new copy of maharadata.
21 March 2009, 19:54
Grr - it's a primary key. So I wonder why MySQL is so angry about it? That InnoDB error says there isn't one, yet there plainly is!
It would be a hard problem to work out unless I had access to your machines, which I'm guessing isn't possible
29 May 2009, 4:40
Any further fix(es) on this? Cos' I just try to upgrade from 1.0.9 to 1.1.3, and it has the same problem. Tried roll back everything (database and mahara data).
I'm using MySQL is 5.0.51.
:( Could not execute command: ALTER TABLE "artefact" ADD CONSTRAINT "arte_ins_fk" FOREIGN KEY (institution) REFERENCES "institution"(name);
Call stack (most recent first):
* execute_sql("ALTER TABLE {artefact} ADD CONSTRAINT {arte_ins_fk...") at /var/subdomain/eportfolio/lib/db/upgrade.php:256
* xmldb_core_upgrade("2008040218") at /mahara/lib/upgrade.php:271
* upgrade_core(object(stdClass)) at /mahara/upgrade.json.php:71
Thanks for you folks help.
Wilson.
02 June 2009, 2:28
Hi - as Howard and I discovered a few days ago, it might be because of the collations of the tables. Could you please paste the output of the following commands:
SHOW FULL COLUMNS FROM artefact;
SHOW FULL COLUMNS FROM institution;
02 June 2009, 21:56
Hi, Nigel and Howard,
Thanks!
Wilson.
mysql> SHOW FULL COLUMNS FROM artefact;
+--------------+--------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+--------------+--------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+
| id | bigint(10) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | |
| artefacttype | varchar(255) | latin1_swedish_ci | NO | MUL | NULL | | select,insert,update,references | |
| container | tinyint(1) | NULL | NO | | 0 | | select,insert,update,references | |
| parent | bigint(10) | NULL | YES | MUL | NULL | | select,insert,update,references | |
| owner | bigint(10) | NULL | NO | MUL | NULL | | select,insert,update,references | |
| ctime | datetime | NULL | NO | | NULL | | select,insert,update,references | |
| mtime | datetime | NULL | NO | | NULL | | select,insert,update,references | |
| atime | datetime | NULL | NO | | NULL | | select,insert,update,references | |
| locked | tinyint(1) | NULL | NO | | 0 | | select,insert,update,references | |
| title | text | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| description | text | latin1_swedish_ci | YES | | NULL | | select,insert,update,references | |
| note | text | latin1_swedish_ci | YES | | NULL | | select,insert,update,references | |
+--------------+--------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+
12 rows in set (0.00 sec)
SHOW FULL COLUMNS FROM institution;
+-------------------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-------------------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| name | varchar(255) | latin1_swedish_ci | NO | PRI | NULL | | select,insert,update,references | |
| displayname | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| registerallowed | tinyint(1) | NULL | NO | | 1 | | select,insert,update,references | |
| theme | varchar(255) | latin1_swedish_ci | YES | | NULL | | select,insert,update,references | |
| defaultmembershipperiod | bigint(10) | NULL | YES | | NULL | | select,insert,update,references | |
| maxuseraccounts | bigint(10) | NULL | YES | | NULL | | select,insert,update,references | |
+-------------------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
6 rows in set (0.00 sec)
03 June 2009, 17:31
That says that the collation of your database is latin1_swedish_ci. This might well be the cause of the problem, although it's hard to change the database collation I think.
A couple of things you could try: comment out this line in lib/dml.php:
$db->Execute("SET NAMES 'utf8'");
It's about line 1434, in the function configure_dbconnection()
Also, what is the output of the command SHOW VARIABLES LIKE 'character_set_database'; ?
03 June 2009, 22:20
Hi Nigel,
Thanks for your quick reply, and I tried to comment out the line, but no luck.
This is the result of SHOW VARIABLES LIKE 'character_set_database';
mysql> SHOW VARIABLES LIKE 'character_set_database';
+------------------------+--------+
| Variable_name | Value |
+------------------------+--------+
| character_set_database | latin1 |
+------------------------+--------+
mysql> SHOW VARIABLES LIKE 'character_set_database';
+------------------------+--------+
| Variable_name | Value |
+------------------------+--------+
| character_set_database | latin1 |
+------------------------+--------+