Forums | Mahara Community

Support /
Help-can't upgrade from 1.2.3 to 1.3.3


Michele Balazs's profile picture
Posts: 10

27 February 2011, 14:16

Hiya

The error message I get is

Could not execute command: ALTER TABLE mah_artefact ADD CONSTRAINT mah_arte_aut_fk FOREIGN KEY (author) REFERENCES mah_usr (id)

Call stack (most recent first):
  • execute_sql("ALTER TABLE mah_artefact ADD CONSTRAINT mah_arte_a...", true) at/srv/www/mahara/lib/dml.php:1406
  • execute_sql_arr(array(size 1), true, true) at /srv/www/mahara/lib/ddl.php:972
  • add_key(object(XMLDBTable), object(XMLDBKey)) at/srv/www/mahara/lib/db/upgrade.php:1487
  • xmldb_core_upgrade("2009111010") at /srv/www/mahara/lib/upgrade.php:301
  • upgrade_core(object(stdClass)) at /srv/www/mahara/admin/upgrade.json.php:93

Can anyone help?

Mich

François Marier's profile picture
Posts: 411

27 February 2011, 19:05

Hi Michele,

It looks like something might be broken in the upgrade script.

To help us narrow the problem down, could you try upgrading in this sequence:

  1. upgrade from 1.2.3 to 1.2.4
  2. upgrade from 1.2.4 to 1.2.5
  3. upgrade from 1.2.5 to 1.3.3

and let us know which upgrades work and which ones fail?

Also, are you running on Postgres or MySQL? which version?

Cheers,

Francois

Michele Balazs's profile picture
Posts: 10

02 March 2011, 15:58

Hi Francois

Apologies  for the delay. I upgraded to 1.26 without issue. The error occured from 1.2.6 to 1.3.3.same error message

Just in case

mysql: 5.0.67

php: 5.2.12

 

Cheers

 

Mich

François Marier's profile picture
Posts: 411

02 March 2011, 16:44

Thanks for the extra testing Michele!

Would it be possible for you to also test these upgrades:

  1. from 1.2.6 to 1.3.0
  2. from 1.3.0 to 1.3.1
  3. from 1.3.1. to 1.3.2
  4. from 1.3.2 to 1.3.3

Actually, you can stop on the first one that fails, but this will help us greatly in finding out where the problem might lie.

Cheers,

Francois

Michele Balazs's profile picture
Posts: 10

03 March 2011, 4:02

ok

1.26. to 1.3.0 failed. same error message.

Many thanks for your help with this

Thomas Edwards's profile picture
Posts: 9

03 March 2011, 6:39

Hi there

I have upgraded from 1.2.5 to 1.2.6 without any issues, but no luck with 1.2.6 to 1.3.0.

There was no error message displayed and the page looked like it had hung upgrading the core.

Only after a reload of the page do I recieve a similar (but not exact) error message as Michele.

I understand this would be caused by my database now being inconsistent as it's only partially upgraded but there is nothing logged in my error log until I reload the page.

Is there a way to run each sql command the upgrade script uses against the database directly?

Many thanks,

Thomas

Ruslan Kabalin's profile picture
Posts: 146

03 March 2011, 9:40

Hello Thomas,

> I understand this would be caused by my database now being inconsistent

Just a quick note that it is quite difficult to make the database inconsistent in Mahara during the upgrade. It uses SQL transactions and the each upgrade stage (core upgrade, plugins, etc.) performed as a single transaction. If it breaks for some reason during upgrade, the database is left at the state as it was before. That is what makes Mahara pretty stable and relaible ;)

The core upgrade sequence is located in htdocs/lib/db/upgrade.php, all what you can see there (or just a part of the sequence depending on the current version) is run as a single transaction. It is not a good idea to replicate the whole procedure manually though.

Would be great if you provide us with more information on the bug. If you could check apache error log, it should definitely contain the information about what causes the error. There is also another way to make Mahara more verbose, just add the following lines to your config.php file:

$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;

Then try to perform upgrade again. The errors will be shown on the screen.

François Marier's profile picture
Posts: 411

03 March 2011, 21:21

Thanks Michele and Thomas.

I have opened a bug report for this:

  https://bugs.launchpad.net/mahara/+bug/728837

In order to be able to reproduce this however, I would need to have a database dump from you. Do you think it might be possible for one of you to send one to me via email? [email protected]

anonymous profile picture
Account deleted
Posts: 10

03 June 2011, 6:51

I need Help,

I want to install Mahara 1.3.0 on my Server but it shows me

Mahara: Site unavailable

Mahara will not run on PHP < 5.2.0. Please upgrade your PHP version, or move Mahara to a different host.

If i check in 5.3 PHP version it runs well, but not working on my Hosting Server

PHP Version 5.1.6 

Please do Help if its possible to run 1.3 Mahara script on PHP 5.1.6

Because currently not possible to change my hosting providor and they are not allowing to upgrade PHP..

 

Moderators, Users and Administrators are requested to Help me to solve my problem..

 

Cheers

Abdullah..


03 June 2011, 10:08

Do you want to install or upgrade? If you want to install Mahara 1.3 or 1.4 you must have the php version required. So the best solution in your case is to change for another ISP or use an older version of Mahara that fits your hosting configuration If you were in the position to upgrade your Mahara to 1.3.x you'd better download again the version that was working before and reinstall your data (maharadata folder and databases) from your latest backup Sorry about that
10 results