Forums | Mahara Community

Support /
problem with upgrade to mahara 1.5


anonymous profile picture
Account deleted
Posts: 808

18 June 2012, 17:13

William,

I'm not sure, I haven't seen the error before on a Mahara installation, and I don't think it's a general problem with quotes in the serialised data, or we would have come across it before.

Also, whenever you look at a page on your old 1.4 site that contains a textbox, the unserialize function is called to get the content.  If it was a general problem with unserialize, then textbox content would most likely not be visible on your site.

If your textboxes worked correctly before the upgrade, perhaps your command line php is behaving differently from your webserver php.  It might be useful to try increasing the max execution time, and then upgrading via the web, see:

https://mahara.org/interaction/forum/topic.php?id=4562

https://mahara.org/interaction/forum/topic.php?id=4544

Otherwise, is it possible it's some kind of character encoding issue between the two databases?  The unserialize function could probably fail if strings appear to be a different length than they were at the time they were serialised.

R.

william chan's profile picture
Posts: 38

19 June 2012, 7:00

Dear Richard,

I have increased both max execution and memory size accordint to your link's suggestion and upgrade it via the web. However, same problem is happened  and some content page are missed.

I have checked all databases 's table character encoding is utf8_generice_ci only.

Regards,

 

anonymous profile picture
Account deleted
Posts: 808

19 June 2012, 16:32

What happens when you look at a one of those missing pages using your old db and the old 1.4 code?  Can you see the content, and do you get the same unserialize error in the log?

william chan's profile picture
Posts: 38

20 June 2012, 5:59

From Old db and 1.4 code, I can see this content.Also same unserialized error is shown when I use web GUI upgrade after enable debug log for mahara.

Conrad Lienhardt's profile picture
Posts: 127

19 April 2012, 7:26

Hi Richard,

thanks for your reply. I reset the system and continue working with 1.4.0 till the upgrading process will run faultless. Trying several times and resetting after each fault is too time-expensive.

May be that I will setup 1.5.0 without upgrading 1.4.0 after the end of this term. Students than have to export their portfolios and import into the new version; Same for me ,-)

Kind Regards
Conrad

Kristina Hoeppner's profile picture
Posts: 4866

20 June 2012, 15:03

Received from a Mahara user via email. I don't know if it might help, but I think they have a number of customizations.

--------------

We have been running into some issues moving our development system from Mahara 1.4 to 1.5  We have worked through upgrading this system version to version with some issues along the way, but were able to resolve them.  Running the 1.5 upgrade I consistently get the error at the bottom of this note.  There seem to be other organizations having similar issues, many described in these forum posts.

https://mahara.org/interaction/forum/topic.php?id=4474

I have tried all of the possible workarounds people had suggested in this page to no avail.  It seems that the developers had acknowledged the issue and were hoping to put a fix in with the 1.5.1 release, which unfortunately was not the case. 

----------------------------------------------------------------

Could not execute command: INSERT INTO "artefact" (artefacttype, ctime, mtime, atime, title, description, owner, "group", institution, author, authorname, note) VALUES (?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?

A ton of the same.... then.....

(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?),(?,?,?,?,?,?,?,?,?,?,?,?)

Call stack (most recent first):

         execute_sql(" INSERT INTO {artefact} ...", array(size 60000)) at/var/www/html/artefact/internal/blocktype/textbox/db/upgrade.php:67

         xmldb_blocktype_textbox_upgrade("2010061800") at/var/www/html/lib/upgrade.php:374

         upgrade_plugin(object(stdClass)) at/var/www/html/lib/db/upgrade.php:2576

         xmldb_core_upgrade("2011061002") at/var/www/html/lib/upgrade.php:301

         upgrade_core(object(stdClass)) at/var/www/html/admin/upgrade.json.php:94

Simon Britton's profile picture
Posts: 4

20 June 2012, 16:46

I too am getting the same, I managed to get from 1.3.6 to 1.4.2 eventually after dumping the MySQL database and doing a search and replace of utf8_unicode_ci with utf8_general_ci (couldnt change a few columns in phpmyadmin as I had foreign key problems)

Then created a new database with the correct collation manually and importing it back

However when trying to take it from 1.4.2 to 1.5.x I get exactly the same issue.

I am hoping this can be resolved soon as at the moment my only hope is a side by side installation and asking 900+ students to recreate their stuff in the new system before disabling the old one.

Shame there was not an option to export your portfolio from 1.4.2 and then allow the student to import it back in to 1.5.1 after they have logged in from moodle instead of the admin having to do it (that would create a new local mahara account anyway and we use SSO from Moodle 1.9). I look forward to any workarounds as our mahoodle guy is chomping at the bit for 1.5.1 :D

Centos 5.8 LAMP setup.

anonymous profile picture
Account deleted
Posts: 808

20 June 2012, 21:22

It'll be really important to know why the "INSERT INTO ..." statment fails, and the actual error message coming from MySQL is being suppressed for some reason.

It would probably help to set

  $cfg->log_dbg_targets = LOG_TARGET_ERRORLOG;

in config.php, restore the db, and then retry the upgrade.  That will hopefully put the MySQL error message into the webserver log.

william chan's profile picture
Posts: 38

21 June 2012, 3:38

 Add the following

$cfg->log_dbg_targets = LOG_TARGET_FILE;
$cfg->log_warn_targets = LOG_TARGET_FILE;
$cfg->log_file ='/var/log/mahara.log';

to mahara config.php and upgrade it via web GUI can generate warning and error log.

Alsp.

Refer to the similar issues. Can anyone know how to solve it?

Please advice since I hope to upgrade it asap .

Regards,

                    William

anonymous profile picture
Account deleted
Posts: 808

21 June 2012, 17:53

Hi William,

I'd really like to fix both these issues, if they're bugs in the upgrade, but I can't reproduce either of them at the moment, so I'm in the dark.

For the error on 'INSERT INTO "artefact"...', I'll have a better idea as soon as someone can give me the actual MySQL error message (it should be in the Mahara webserver log).

I'm not sure what's causing the unserialize errors you're seeing, but I don't think it's a general problem, it's something specific to your data.  Possibly it was serialized incorrectly in the first place.  I took the example block you gave above:

a:1:{s:4:"text";s:288:"<p>I plan to &nbsp;&nbsp;<img title="Tongue out" src="http://maharadev.ln.edu.hk/mahtest/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif" alt="Tongue out" border="0" />&nbsp;1, write down the new words i meet in the class,and copy them in a little note book which is easy to bring with me.</p>";}

and I put it directly into a block instance in the database of a 1.4 Mahara.  When I view the page containing that textbox, the content does not display, and I get "unserialize(): Error at offset 311 of 325 bytes" in the logs.  This is in 1.4 only, so it's nothing to do with the upgrade to 1.5.  I created a new textbox, still in 1.4, and in the html I pasted just the content from your example:

<p>I plan to &nbsp;&nbsp;<img title="Tongue out" src="http://maharadev.ln.edu.hk/mahtest/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif" alt="Tongue out" border="0" />&nbsp;1, write down the new words i meet in the class,and copy them in a little note book which is easy to bring with me.</p>

When I look at the database afterwards, the serialised data for the new block is:

a:1:{s:4:"text";s:299:"<p>I plan to &nbsp;&nbsp;<img title="Tongue out" src="http://maharadev.ln.edu.hk/mahtest/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif" alt="Tongue out" border="0" />&nbsp;1, write down the new words i meet in the class,and copy them in a little note book which is easy to bring with me.</p>";}

So if you look carefully at those two bits of serialised data, the first one (which produces the error) thinks the "<p>I plan to..." string has a length of 288, but the second one shows a length of 299.  So I suspect the problems you are seeing already existed in your data, before you began the upgrade to 1.5.  I don't know how it could have happened.

By the way, as far as I remember, LOG_TARGET_FILE isn't very useful because it overwrites the entire file every time there is output.  LOG_TARGET_ERRORLOG is usually better.

R.