Somewhere on the OJS forum there was a topic on upgrading from 2.4.8.5 to 3.x. BUT the topic stated that you MUST go to an intermediate version of 3.x versus upgrading to the newest release.
Unfortunately I cannot find that topic/thread ANYWHERE on this forum. Can someone show me please? Many thanks! I did find the bookmarking function on this forum so it will be book marked for ever!
Thereâs a document included in the OJS package in docs/UPGRADE-UNSUPPORTED.md that makes recommendations â you can read it online for the latest 3.3.x release here:
Regards,
Alec Smecher
Public Knowledge Project Team
Not that the beerâs a bad idea â but no problem, itâs helpful to have documents like that linked from here in the forum in case people search for it.
Regards,
Alec Smecher
Public Knowledge Project Team
Alec, I followed these instructions as well as your Youtube video and when I run the command php tools/upgrade.php check there is no output to the screen. Unlike the video that shows the codebase and database versions. Here is the error messages.
[13-Apr-2022 20:39:30 America/New_York] PHP Warning: Constants may only evaluate to scalar values in /home/radjr1/domains/ojs2.wmpllc.org/public_html/ojs/lib/pkp/classes/db/DBConnection.inc.php on line 17
[13-Apr-2022 20:39:30 America/New_York] PHP Parse error: syntax error, unexpected â?â, expecting variable (T_VARIABLE) in /home/radjr1/domains/ojs2.wmpllc.org/public_html/ojs/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374
Dumb question. Do we need to run running PHP7.x for this to upgrade to run? If so how to you make 7.x run in place of 5.4 when both are installed?
Lastly, the system panel is showing.
php
Iâm guessing youâre trying to upgrade to the latest 3.2.x, correct? If so, youâll need to be using PHP between 7.2.x and 7.4.x. I expect 5.6.0 is the one thatâs running when you execute php without specifying a path; thatâs too old, hence the error message.
If youâre using the command-line upgrade tool (recommend), youâll need to specify a path to the right version of PHP â that is, /path/to/php tools/upgrade.php instead of php tools/upgrade.php, where /path/to is the path to the appropriate version of PHP. Unfortunately Iâm not sure what that path will be on your server; you may need to check your service providerâs knowledge base.
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks Alec. Suggest a note be made in the upgrade package because if people are sandboxing their upgrade from a clone, they may hit the same issue⊠Then again, we are probably the last people on the planet to upgrade so the horse has left the barn!
Alec, We have had problems doing a jump from 2.4.8.5 to 3.2. Is there a better intermediate version of OJS that we should use instead of 3.2? Thanks, radjr
Also when you do a backup of the OJS folder, does the SQL database get copied too?
Thanks Alec. We will try again. It is possible that the upgrade was run under the root user and not the user that runs ojs. We did seem to miss one step which was to copy the public directoryâŠand copying after the upgrade did not fix the problem.
As for backups, I have used the backup in the OJS system folder ojs/index.php/index/backup but that creates and downloads the .sql file. If we run in to upgrade problems and have to restore the database, we can only use the VPS full backup to get the system back to some known state. It is unclear how to restore that SQL file and really made us rethink our backup strategy.
Thanks!
If you can capture the upgrade problem in detail, I can potentially make suggestions.
The OJS backup plugin uses mysqldump to extract the contents of the database into the .sql file. As long as the .sql is extracted completely (i.e. your server doesnât hit some kind of timeout while itâs happening) the .sql file should contain a complete record of the database schema and data. Restoring it is more of a MySQL question than an OJS question, but you can usually use a CPanel-based tool like PHPMyAdmin to reload the database from a database dump file like this.
Regards,
Alec Smecher
Public Knowledge Project Team
This is what I was suspecting in my post above. Just running php may give you a version thatâs different from what CPanel reports â and in your case, a very old version. You may need to specify the path to the right PHP executable when you run your command line upgrade.
Regards,
Alec Smecher
Public Knowledge Project Team
Yes, thanks. That is a good page. In our case we decided to clone the VPS that was running OJS and do the test upgrade on that server. That in itself introduced some interesting challenges one of which is file ownership. This gets compounded with control panels like Cpanel, Direct admin or plesk as they add a level of indirection based on the users installed in those control panels. Anyway, we did get it running with the correct permissions and everyone should get comfortable with Chown. In our case, I logged in as root and forgot that OJS was running under a different user that was created by DirectAdmin. Anyways, words for the wise. That said, my sincere thanks to everyone especially Alec!
If you received confirmation that the upgrade succeeded (e.g. âSuccessfully upgraded to version 3.3.0-10â) then itâs likely that youâre encountering something new thatâs not related to the upgrade, but likelier some interaction of your platform and the new version.
If thatâs the case, Iâd suggest starting fresh in asking whatâs happening â check your PHP error log and summarize what you find in a new thread if you donât see it elsewhere on the forum. Thatâll help keep this thread from growing beyond its original topic.
If you didnât get a confirmation that the upgrade succeeded, then itâs likely that the upgrade didnât complete 100% â you should get an error in the PHP error log if nothing else.
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks Alec. We did receive confirmation on screen that the upgrade completed successfully. I think it said Successfully upgraded to 3.2.1.10. There is no error in the PHP error log. Interesting, things like the quick submit plugin and all the graphical elements from 2.4.8.5 are gone. When looking at the Plug-in gallery, it just sits and spins and never returns anything. I used the config.inc.php from the 2.4.8.5 install and made no other changes. Is there an additional directive that is required for 3.2? Cheers and thanks!