Error while upgrading from ojs 3.1.1-4 to 3.1.2

#1

Hello All,
Today I tried to upgrade my ojs installation from 3.1.1-4 to 3.1.2 but when I hit the upgrade button through the web installer, I instantly get internal server error (500) and then I tried to manually upgrade the database through tools/upgrade.php script but I receive “Your server’s php version is not supported by this software”. Available versions of php are 5.6.3 and 7.2.7 and upgradation is failing with both of them. I am receiving this error for the first time. Do not know what to change.
I am using IIS. Please if someone can help me to figure this weird issue out.

Thanks in advance.

#2

Hi @Farhan_Abbas,

As far as I know 3.1.2 version dropped the support for PHP 5.6. Can you double check if you are using PHP 7.2 for that particular OJS instance, e.g. via the dashboard: Administration -> System Information?

#3

Dear @Vitaliy, I checked the PHP version for OJS instance as per your advice and it is showing 7.2. (Screenshot attached).

Regards,

#4

@asmecher Can someone help me out in this issue?

#5

Hi @Farhan_Abbas,

Sorry for the delay. If you are updating from a terminal, you should check also CLI version: php -v or php --version on Ubuntu. It may be different from PHP Apache module.

#6

Hi @Vitaliy I am using Windows Server and IIS. How can I check the cli version of php?

Kind Regards,

#7

Hi @Vitaliy you were right, when I check the version of php in terminal it shows 5.6. How can I switch to other installed version? (7.2 in my case)

Regards,

#8

Hi @Vitaliy I was able to run upgrade script after changing the path of php to 7.2.
Now I am facing a totally different problem. I am receiving such errors for many users
" Duplicate entry ‘3-en_US-givenName-0-0’ for key ‘user_settings_pkey’" I have already deleted many such enteries and running upgrade script again and again… Can you help me to diagnose and fix this issue? I shall be highly grateful.

Regards,

#9

Hi @Farhan_Abbas,

Have you performed a new upgrade from a backup? If you have duplicated entries in the database, it’s quite possible they they were added with an upgrade script during the first unsuccessful run.

1 Like
#10

No, I did not perform upgrade from a backup, I ran upgrade with the same database which was used in previous unsuccessful run… So, is that an issue?

#11

Yes. As I wrote, previous database upgrade can lead to this error.

#12

But there was no previous upgrade which actually affected database records, only front end was upgraded and I was stuck on upgrade.php upgrade procedure due to php version…
Anyhow, yesterday, I was successful in upgrading the ojs database after a lot of hard struggle. I had to delete records from two tables using 5 queries.
user_settings: givenName, familyName, preferredPublicName
author_settings: givenName, familyName
Then the upgrade procedure was successful.

This was a tough challenge though but learnt something new as well. :frowning: :slight_smile:
Thanks a lot for your help, really appreciate it…

Kind Regards,