Failure to upgrade : table ojs.publications not found

Hi,
I upgraded OJS from version 3.1.1.4 to 3.3.0.8, because my system was upgraded to PHP 8.0. However, the upgrade failed because of a defunct function in PHP 8, that was deprecated in PHP 7 : get_magic_quotes_runtime().
Now, my database seems in a transient state, and if I try to connect to the web site, the home page works but when clicking on a journal page, I get a blank page and the error is

Base table or view not found: 1146 Table ‘ojs.publications’ doesn’t exist

Is there any way to resolve this problem? I can’t get back to previous versions because of the PHP 8 compatibility issue…
May be just help identify where in the code source the call to get_magic_quotes_runtime() occurred and continue by hand the upgrade process? But I’m not sure where the code source actually is…
Thank’s in advance for any help,

Hi @ecuris

Your best bet is to take the backup of your 3.1.1.4 installation, install it on a server that has PHP 7.3/4 on it, perform your upgraded to 3.3.0.7, and then try running that upgraded installation on your PHP8 server. For what it’s worth, we at PKPPS do not use PHP8 with OJS 3.3.

There are major differences between 3.1.1 and 3.3 so I don’t think it’d be possible to continue the upgrade by hand at this point. If you search the 3.3 code for get_magic_quotes_runtime the only place those methods appear are in the third party database libraries themselves. I would be wary of running OJS 3.3 using PHP8.

Best
Jason

Unfortunatly, I do not have access to servers with PHP7 now, all were upgraded…
Is there any chance than installing from scratch, and not upgrading, may work? Of course, with loss of archives and so on, but best that no site at all!

Hi @ecuris

Do you have backups of your 3.1.1.4 installation?

To be honest, I personally do not know how well OJS 3.3 works with PHP8. If you search the forums for PHP8 errors you’ll find a few others, like this one: Statistics not showing in OJS - #10 by jnugent

You could, in theory, set up a local webserver/PHP7.4 environment on your laptop or PC, create a 3.1.1.4 installation using your backups if you have them, and upgrade that to 3.3.0.7.

Regards,
Jason

I’ll explore that — including backups and where they are. I think that begins to be outside my scope of knowledge :frowning: (my PCs are also using the last linux with PHP 8 by default, and this distribution claimed it does not support php 7 anymore, so…)
Thanks for the hints anyway…

Which Linux distribution is it? I run Ubuntu on my laptop and maintain an OJS 3.3 development environment and I have PHP 7.4 here. PHP is still releasing versions of PHP 7.4, so it’s not End of Life or no longer supported. I am surprised there are Linux distributions dropping support for it.

Jason

Mageia 8. But I’ll check more in depth to see what they say exactly… There seem to be only php8 packages however.

I found this for you:

https://forums.mageia.org/en/viewtopic.php?f=7&t=14038

There are a few workarounds there, although removing PHP7 as an option still strikes me as premature.

Cheers,
Jason

Thanks. I will check this.
Best regards,