Error updating database from 2.4.1 to 2.4.8


#1

I am using a local installation on linux apache2, php 5.6. I upgraded applying line command patch, and it worked fine., but when I tried to update database, I got this message:

sudo php tools/upgrade.php upgrade
[sudo] password for manuel:
PHP Deprecated: Non-static method PKPApplication::defineExposedConstant() should not be called statically in /var/www/html/relatlocal/relat/lib/pkp/classes/core/PKPApplication.inc.php on line 545
PHP Deprecated: Non-static method PKPApplication::getExposedConstants() should not be called statically in /var/www/html/relatlocal/relat/lib/pkp/classes/core/PKPApplication.inc.php on line 513
PHP Fatal error: Cannot use ‘String’ as class name as it is reserved in /var/www/html/relatlocal/relat/lib/pkp/classes/core/String.inc.php on line 57
On home page I get this:

DB Error: Unknown column ‘domain’ in 'field list’
Thanks


#2

Hi @mayuso,

I suspect your command-line PHP is actually PHP 7.0, not PHP 5.6, as the String name was reserved starting with PHP7.

OJS 2.4.8 won’t run on PHP7 – you’ll either need to really downgrade your PHP to 5.6, or upgrade your OJS to 3.x.

Either way, you’ll need to restore your OJS from backup and retry the upgrade again with the versions reconciled.

Regards,
Alec Smecher
Public Knowledge Project Team


#3

Hi Alec,
Thank you very much. I repeated the process issuing sudo php5.6 tools/upgrade.php upgrade, and it worked right. But, now I have a a new problem: I cannot access to administration pages, though I introduce same user and password as in on-line version, where it works.
Thanks


#4

Hi @mayuso,

Where are you trying to log in if not online? What happens when you try?

Regards,
Alec Smecher
Public Knowledge Project Team


#5

Hi Alec,
I am Manuel and I am the webmanager of an ojs site.
I am trying to have a local mirror of my website (www.relat.org , ojs 2.4.1.0). Since I made some customizations, I would like to check what happens if I update it locally, then, if needed, repeat or adapt my customizations, and then upload and put it on line.
My system is ubuntu 17.10 with LAMP (Apache/2.4.27 (Ubuntu)
Versión del cliente de base de datos: libmysql - mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
extensión PHP: mysqliDocumentación mbstringDocumentación
Versión de PHP: 5.6.34-1+ubuntu17.10.1+deb.sury.org+1)
Firstly I download all on line files and the database. The site works, though not completely: for instance, there is nor local versions neither buttons to change them. But, when I try to login to access to management pages, I get the error message “wrong user or password”. Database is utf8.
I have followed the update instructions. After issuing php terminal instruction, the message was Successful update.
Thanks in advance


#6

PS My online installation has these data:

nginx/1.11.10
Versión del cliente de base de datos: libmysql - mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
extensión PHP: mysqliDocumentación curlDocumentación mbstringDocumentación
Versión de PHP: 5.6.30


#7

Hi again,
I have change my laptop and I’ve got it, my localhost copy works fine. So I’m trying to upgrade from 2.4.0 to 3.1.0.1 But in updating by web (localhost/…/InstallUpgrade) I get this error: Specifified key was too long; max key length is 767 bytes"


#8

Hi @mayuso,

I believe there are other posts in the forum about that error message – it’s from MySQL. Check to see if the other posts are useful.

Regards,
Alec Smecher
Public Knowledge Project Team


#9

Hi Alec,
Thanks for your response. I sought in Forum, but I didn’t find anything, could you say me where I must search or what to write?
Thank you


#10

Hi @mayuso,

See e.g. this Stackoverflow post. Essentially, your best solution is to upgrade your MySQL/MariaDB installation.

Regards,
Alec Smecher
Public Knowledge Project Team