Alternate method for upgrading to 3.4 or next

Hello:
Our last upgrade attempt in October '23 has failed, and it was beyond the hosting service’s scope to make code changes. However, they are agreeable to take a different route: by installing 3.4 on a separate server and move folders an files over to the new site.

I saw these instructions for backing up specific folders, files, and databases: https://docs.pkp.sfu.ca/faq/en/site-administration#how-can-i-create-a-backup-of-my-site. Will copying these files into the 3.4 installation work? Has this approach worked for anyone? What kinds of changes are necessary in the config.php file (email settings)? Thank you in advance for any pointers!

@asabhar

@asabhar,

Supposing you’re using OJS 3.3 and it has no custom changes:

  1. Backup your database, files dir and public folder.

  2. Make a clean OJS 3.4 install. The server must meet the following requirements:

  1. Create a new database and import your OJS 3.3 database into it, update OJS 3.4 settings in config.inc.php with the new DB settings.

  2. Copy your files dir to the OJS 3.4 install.

  3. Copy your public folder to the OJS 3.4 install.

  4. Upgrade the database, hopefully you’ll have no errors at this point.

Best regards,
Josh Noronha

Thank you very much, Josh.

Did you have to change email settings in the config.inc.php file? Although we had not used PHPMailer at all; the main cause of the upgrade failure pointed to the PHPMailer in the error log. Back in 2019, our IT communications expert (no longer at the university) used a method other than PHPMailer or smtp to get authentication going. Will 3.4 require smtp for email settings?

Best regards!
Arjun

Dear @asabhar,

You can choose what to use in config.inc.php; I’d suggest not touching email settings in this test install, the point is to check if the upgrade will occur without incidents; once everything is working you can check email settings and everything else in config.inc.php:

; Default method to send emails
; Available options: sendmail, smtp, log, phpmailer
default = sendmail

Best regards,
Josh

Thanks for the suggestion Josh. Yes, we want to make sure that the new install looks right first, then customize as necessary. Best wishes!
Arjun

Hi @jnoronha

i tried your method. all of the points and tried to upgrade
All worked
It asked to change 2 table (pln_****) to change to INNODB which I did and the again upgraded
Lastly when I clicked upgrade button it went white blank page
Error log showed this

[02-Jan-2025 14:13:42 UTC] Storage engine that doesn’t support foreign key constraints detected in one or more tables: pln_deposit_objects, pln_deposits. Change to InnoDB before running the upgrade.
[02-Jan-2025 14:20:47 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[02-Jan-2025 14:20:47 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
[02-Jan-2025 14:20:47 UTC] WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[02-Jan-2025 14:21:02 UTC] PHP Warning: Attempt to read property “primary_locale” on null in /home/jmcduokc/public_html/ojs341/ojs345/lib/pkp/classes/migration/upgrade/v3_4_0/I5716_EmailTemplateAssignments.php on line 461

the first line of error log was rectified. the very last line of “PHP Warning: Attempt to read property”

this was the last error I received. Please guide.

Hi @a2usmani,

When you got the INNODB error, did you drop the entire database and re-imported it, before the fix? OJS upgrade needs to be redone from the start every time you get an error.

Best regards,
Josh

Hi

No I didnt do that. Let me try again and inform you

Thanks

Hi @jnoronha

I followed the whole points again
Fixed the innodb issue before upgradation. But I still got white blank page

[02-Jan-2025 16:47:49 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[02-Jan-2025 16:47:49 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
[02-Jan-2025 16:47:49 UTC] WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[02-Jan-2025 16:48:04 UTC] PHP Warning: Attempt to read property “primary_locale” on null in /home/jmcduokc/public_html/ojs341/ojs345/lib/pkp/classes/migration/upgrade/v3_4_0/I5716_EmailTemplateAssignments.php on line 461

Please clear point 4 and 5

I overwrited files directory into the new directory of 3.4
I only overwrite public folder into the public_html of 3.4

Is this correct? Please guide.

Did your upgrade attempt finish with a success message saying it was upgraded to OJS 3.4? If the answer is yes, you can go to the steps below. If not, drop the entire database, import your original backup, make the INNODB fix, run the queries below and then try to upgrade the install once again.

You can check if you have any null primary_locale with this query:

SELECT journal_id, primary_locale FROM journals WHERE primary_locale IS NULL;

You can then change NULL with a locale, like “en_US”.

UPDATE journals SET primary_locale = 'en_US' WHERE primary_locale IS NULL;

Hi @jnoronha

I didnt see a success message. Only white blank screen
The query returned no results after changing myiasm to innodb

Can you please clear these points. I will be grateful. I am confused whether I am doing right or not

  1. Copy your files dir to the OJS 3.4 install (I overwrite files directory into the new directory of 3.4)

  2. Copy your public folder to the OJS 3.4 install. (I only overwrite public folder into the public_html of 3.4)

  3. Upgrade the database, hopefully you’ll have no errors at this point.(I upgraded manually as done in 3.3 versions by extracting 3.4 ojs in the new clean 3.4 previous installation as in point no 2 and turning installed to off and then the usual way. Am I correct?)

Hi again

I did the same steps as you told me but again got white blank page with same error log

[03-Jan-2025 13:55:19 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[03-Jan-2025 13:55:19 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
[03-Jan-2025 13:55:19 UTC] WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[03-Jan-2025 13:55:34 UTC] PHP Warning:  Attempt to read property "primary_locale" on null in /home/jmcduokc/public_html/ojs341/ojs345/lib/pkp/classes/migration/upgrade/v3_4_0/I5716_EmailTemplateAssignments.php on line 461

Please see my steps once

  1. installed 3.4.0.5
  2. made new db, imported 3.3 db in it, changed myiasm table to innodb, changed config.php settings in 3.4
  3. copied the public folder from 3.3 to 3.4
  4. copied files directory from 3.3 to 3.4
  5. deleted files in UsageStats/reject, stage, processing folder from the files directory since it gave an error during upgradation
  6. then I did an upgradation the old-fashioned way
  7. In 3.4 folder I extracted a new 3.4 ojs for upgradation. Copied config and public folder. Set off installed and then upgraded and got white blank page.

These are the steps I took. Please kindly review and advise. Thankyou

@jnoronha

Please kindly have a look and advise.

Thankyou

HI @a2usmani,

Are you running the upgrade via cli or browser?

If via cli, please use the command nohup php -d memory_limit=2048M upgrade.php upgrade inside the folder www/tools. When the error occur it will be registered in a file named nohup.out, please open the file with Vim and copy the error at the bottom of it. It’ll be a PHP fatal error.

Best,
Josh

Hi @jnoronha

I am doing all the things via browser. Please advise
Thankyou

Please check my updated answer.

Hi @jnoronha

Which answer is updated? Apologies, but I couldn’t find any

This one: Alternate method for upgrading to 3.4 or next - #15 by jnoronha

Hi @jnoronha
thanks for above hints.

I am currently running OJS 3.2.1.2 with PHP 7.2 and MariaDB 10.4.
I want to upgrade to OJS 3.4.08 and can go with PHP 8.3.

Does your suggest workflow above work as well with 3.2 > 3.4?

Best
Richard

Dear @richklau,

To upgrade from OJS 3.2.1-2 to 3.4.0-8, you’ll need to upgrade to OJS 3.3 first. I’d use PHP 8.1 in the process.

Best regards,
Josh