OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Unable to upgrade

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Unable to upgrade

Postby faga » Mon Dec 17, 2007 7:15 am

After uploading 2.2 files, attempting to upgrade from 2.1.1.0 returns the following error:

A database error has occurred: Duplicate column name 'currency_id'

Please help.

Abraham
faga
 
Posts: 11
Joined: Thu Mar 31, 2005 5:54 pm
Location: Beaumont, Alberta

Re: Unable to upgrade

Postby asmecher » Mon Dec 17, 2007 12:57 pm

Hi Abraham,

Could you attach the full output of the upgrade process?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Unable to upgrade

Postby faga » Tue Dec 18, 2007 6:11 am

Alec: Below is the full error message:

OJS Version 2.2.0.0

Thank you for downloading the Public Knowledge Project's Open Journal Systems. Before proceeding, please read the README and UPGRADE files included with this software. For more information about the Public Knowledge Project and its software projects, please visit the PKP web site. If you have bug reports or technical support inquiries about Open Journal Systems, see the support forum or visit PKP's online bug reporting system. Although the support forum is the preferred method of contact, you can also email the team at pkp-support@sfu.ca.

It is strongly recommended that you back up your database, files directory, and OJS installation directory before proceeding.

If you are running in PHP Safe Mode, please ensure that the max_execution_time directive in your php.ini configuration file is set to a high limit. If this or any other time limit (e.g. Apache's "Timeout" directive) is reached and the upgrade process is interrupted, manual intervention will be required.

Errors occurred during installation:

* A database error has occurred: Duplicate column name 'currency_code_alpha'

Abraham
faga
 
Posts: 11
Joined: Thu Mar 31, 2005 5:54 pm
Location: Beaumont, Alberta

Re: Unable to upgrade

Postby asmecher » Tue Dec 18, 2007 11:23 am

Hi Abraham,

If you have access to the command line on your server, try using the tools/upgrade.php script and posting the results of that. It provides more information on what's happening. (Please restore your pre-upgrade backup first, if possible, and if you don't have one, please make one before doing anything else!)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Unable to upgrade

Postby faga » Wed Dec 19, 2007 2:30 pm

Alec:
We don't have PHP-CLI, unfortunately. Is anyone else reporting difficulties with the upgrade?

Abraham
faga
 
Posts: 11
Joined: Thu Mar 31, 2005 5:54 pm
Location: Beaumont, Alberta

Re: Unable to upgrade

Postby asmecher » Wed Dec 19, 2007 4:47 pm

Hi Abraham,

No, the upgrades have been going smoothly so far; one or two issues reported, but those have turned out to be file permissions problems and the like. This must've happened as a result of a failed upgrade, which left your system in an intermediate state. Can you restore your database to its state before the upgrade began, and try again?

Regards,
Alec Smecher
Public Knowledge Project
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Unable to upgrade

Postby faga » Wed Dec 19, 2007 4:53 pm

Alec: Thanks. I believe you are right. I will restore and try again - I'll let you know how it goes.

Regards,
Abraham
faga
 
Posts: 11
Joined: Thu Mar 31, 2005 5:54 pm
Location: Beaumont, Alberta

Re: Unable to upgrade

Postby bernardforgues » Fri Dec 21, 2007 7:10 am

Hi,
Same problem here:
Errors occurred during installation:
* A database error has occurred: Duplicate column name 'currency_code_alpha'

Alas, no CLI interface.
Alec, please, what exactly do you mean by restoring the "database to its state before the upgrade began"? The database only, right, not all the files and config, etc?

Thanks in advance!
Bernard
bernardforgues
 
Posts: 13
Joined: Wed Mar 14, 2007 6:27 am
Location: France

Re: Unable to upgrade

Postby asmecher » Fri Dec 21, 2007 10:52 am

Hi Bernard,

Is this happening on your second upgrade attempt? If so, it's best to restore your database to its state before you tried the first upgrade so that the upgrade is clean. A database restore is all that's needed; no need to restore files or anything else.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Unable to upgrade

Postby bernardforgues » Wed Dec 26, 2007 9:42 am

Hi Alec,
Yes, a second attempt gave the same result.
I did restore the database and tried again, but to no avail.
I don't know if this is relevant, but it looks like the php.ini is set up so that the time limit is very low. I noticed that because restoring the database took three rounds. But unfortunately, I don't have access to the php.ini file...
Would you be so kind as to suggest another route or guide me through the manual install?
Many thanks,
Bernard
bernardforgues
 
Posts: 13
Joined: Wed Mar 14, 2007 6:27 am
Location: France

Re: Unable to upgrade

Postby smiri » Thu Dec 27, 2007 3:20 pm

Hi Bernard,

bernardforgues wrote: Errors occurred during installation:
* A database error has occurred: Duplicate column name 'currency_code_alpha'


Are you getting the same error message on your second try as well? If not, have you checked the error logs to see what error messages there are? If you don't have access to the error logs, you can add this line to the begining of your index.php file, right after <?php :

ini_set('display_errors', E_ALL);

Also, what version are you upgrading to 2.2? are you upgrading from 2.1.1 to 2.2?

Lastly, for the upgrade, have you looked at "docs/UPGRADE", "docs/README" and "docs/release-notes/*"? Let me know if you need any help with some part of the instructions.

Regards,
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Unable to upgrade

Postby asmecher » Sat Dec 29, 2007 11:48 am

Hi Bernard,

This will only happen if you're attempting to upgrade an install that has already failed to upgrade properly, leaving it in an inconsistent state. If you haven't got a backup from before the first upgrade attempt, you may need to run through the upgrade process manually.

Before you begin, make sure you have a good backup as this process will take some legwork, particularly if you're not sure what caused the first upgrade attempt to fail (which would indicate how far through the process you got).

Begin by removing the problematic statement and attempting to upgrade. The statement is in dbscripts/xml/upgrade/2.2.0_preupdate.xml. Remove the following:
Code: Select all
<!-- Bug #2424: Change from currency IDs to 3-letter codes; the currency
             table can be dropped (later) and XML is used instead. -->
        <sql>
                <!-- This syntax works for both PostgreSQL and MySQL. -->
                <query>
                        ALTER TABLE subscription_types ADD COLUMN currency_code_alpha VARCHAR(3)
                </query>
        </sql>
Try running the upgrade again and see how far you're able to get. If you encounter another problem, post here and I'll let you know what the next step is.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Unable to upgrade

Postby bernardforgues » Tue Jan 08, 2008 6:47 am

Hi Alec,
Many thanks for your help. I've been snowed under tons of things, but I now can work on this during the week.
Anyway, since I have a backup, I first tried to restart with a fresh copy.
I dropped all tables in my sql database, imported the backup, edited the config file so that it states installed=Off, and went back to do the upgrade.
The wheel spun for a while, and this time, the error message is:
Errors occurred during installation:
* A database error has occurred: Duplicate entry '1' for key 2

If I had had the same error message, I would have tried the manual route, but now I'm confused. What should I do?
Should I implement the solution you gave in your previous message?

Thanks in advance. And BTW, I'm entirely comfortable to give you the passwords to look into our site if this can save your time.
Cheers,
Bernard
bernardforgues
 
Posts: 13
Joined: Wed Mar 14, 2007 6:27 am
Location: France

Re: Unable to upgrade

Postby asmecher » Tue Jan 08, 2008 9:59 pm

Hi Bernard,

Let's start by finding out what database query caused the error message. Could you restore your database from backup, and try the upgrade again? This time, just before hitting the "Upgrade" button, turn on the "debug" setting in your config.inc.php file and save it. Then try the upgrade. This will generate a lot of debugging information, and will include the problematic SQL statement at the end of the page.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9050
Joined: Wed Aug 10, 2005 12:56 pm

Re: Unable to upgrade

Postby bernardforgues » Wed Jan 09, 2008 6:05 am

Hi Alec,
Many thanks for the great service!
I did as instructed and here's what happened.
First, and contrary to what happened before, the installation page opened in French. I hit the upgrade link and nothing happened.
I switched to English, hit the upgrade link again, and the resulting page was the same as usual (I think): it starts with "OJS Upgrade" as the title, then "OJS Version 2.2.0.0". Then, after the usual 3 paragraphs, here's the error message I got:
Errors occurred during installation:
* A database error has occurred: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Not too verbose, I'm afraid... Is there a log hidden somewhere? I searched, but to no avail.
Thanks again,
Bernard
bernardforgues
 
Posts: 13
Joined: Wed Mar 14, 2007 6:27 am
Location: France

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests