Ojs restoration problem

Hello

Dear pkp team,

I try to upgrade my ojs 3.0.2.0 to 3.2.1.1, before starting any upgrade I get a backup of older version, i face some errors like below :
A database error has occurred: Table ‘submission_galley_settings’ already exists
A database error has occurred: Table ‘review_assignments_tmp’

Since I had an unsuccessful upgrade, I tried to restore the last backup of the site but I got the following error, can I ask you to use your cooperation?

Based on our Apache error log, I find the below error for my website.

[Thu Oct 01 01:01:53.702748 2020] [:error] [pid 6609:tid 47042797934336] [client 103.6.196.115:57030] PHP Warning: Constants may only evaluate to scalar values in /home/myID/public_html/MYSITE/lib/pkp/classes/db/DBConnection.inc.php on line 17

[Thu Oct 01 01:01:53.787600 2020] [:error] [pid 6609:tid 47042797934336] [client 103.6.196.115:57030] PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /home/myID/public_html/MySITE/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374

Hi @masoume_tm,

This message:

 [Thu Oct 01 01:01:53.787600 2020] [:error] [pid 6609:tid 47042797934336] [client 103.6.196.115:57030] PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /home/myID/public_html/MySITE/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374

…is coming up because your PHP version is too old. If you’re using PHP from the command line, you might be using a different version than your web-based PHP. You can use php --version to check.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I change the php version to 7.2. and I faced below errors now.

[Thu Oct 01 06:37:56.938341 2020] [:error] [pid 367003:tid 47042785326848] [client 114.119.145.175:41848] #5 /home/my_id/p in /home/my_id/public_html/my_site/lib/pkp/classes/db/DAO.inc.php on line 703

[Thu Oct 01 06:37:56.938082 2020] [:error] [pid 367003:tid 47042785326848] [client 114.119.145.175:41848] #4 /home/my_id/public_html/my_site/lib/pkp/classes/core/PKPPageRouter.inc.php(187): HookRegistry::call(‘LoadHandler’, Array)

[Thu Oct 01 06:37:56.937761 2020] [:error] [pid 367003:tid 47042785326848] [client 114.119.145.175:41848] #3 /home/my_id/public_html/my_site/lib/pkp/classes/plugins/HookRegistry.inc.php(107): PKP\Services\PKPNavigationMenuService->_callbackHandleCustomNavigationMenuItems(‘LoadHandler’, Array)

[Thu Oct 01 06:37:56.937274 2020] [:error] [pid 367003:tid 47042785326848] [client 114.119.145.175:41848] #2 /home/my_id/public_html/my_site/lib/pkp/classes/services/PKPNavigationMenuService.inc.php(638): NavigationMenuItemDAO->getByPath(1, ‘search/authors’)

[Thu Oct 01 06:37:56.936873 2020] [:error] [pid 367003:tid 47042785326848] [client 114.119.145.175:41848] #1 /home/my_id/public_html/my_site/lib/pkp/classes/navigationMenu/NavigationMenuItemDAO.inc.php(51): DAO->retrieve(‘SELECT\t* FROM n…’, Array)

[Thu Oct 01 06:37:56.936490 2020] [:error] [pid 367003:tid 47042785326848] [client 114.119.145.175:41848] #0 /home/my_id/public_html/my_site/lib/pkp/classes/db/DAO.inc.php(103): DAO->handleError(Object(ADODB_mysqli), ‘SELECT\t* FROM n…’)

[Thu Oct 01 06:37:56.935972 2020] [:error] [pid 367003:tid 47042785326848] [client 114.119.145.175:41848] PHP Fatal error: Uncaught Exception: DB Error: Table ‘my_site.navigation_menu_items’ doesn’t exist Query: SELECT\t* FROM navigation_menu_items WHERE path = ? and context_id = ? and type= ? in /home/my_id/public_html/my_site/lib/pkp/classes/db/DAO.inc.php:703

I see that in same cases you guide ppl that : they use installed: Off in config.inc.php, I do so, but as expected I see installed page in loading of my website.
Why we should do that?

Hi @masoume_tm,

It looks to me like you’re trying to use your OJS 3.0.2 database with OJS 3.2.1-1 code. To convert your database from 3.0.2 to 3.2.1-1, you’ll need to run the upgrade script; see docs/UPGRADE.md for details.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

We were finally able to restore the previous ojs backup by reinstalling it and restoring the backup, we got help from Softoculous team to do this but we still can not update the website. The current version of our site is 3.0.2.0, works with php5.3 and when we change the php version to 7.2 or higher, the site does not come up and http error 500 shiwn in browser.
The team of Softoculous said that: The upgrade wont be successful until your installation works fine with php 7.2.

Here is our errors while using php 7.2:

[02-Oct-2020 07:44:24 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/my_ID/public_html/my_site/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[02-Oct-2020 07:44:24 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/my_ID/public_html/my_site/lib/pkp/lib/adodb/adodb.inc.php on line 263
[02-Oct-2020 07:44:24 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/my_ID/public_html/my_site/lib/pkp/lib/adodb/adodb.inc.php on line 359
[02-Oct-2020 07:44:24 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/my_ID/public_html/my_site/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[02-Oct-2020 07:44:24 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/my_ID/public_html/my_site/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[02-Oct-2020 07:44:24 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/my_ID/public_html/my_site/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Regards,

Hi @masoume_tm,

See e.g.: Uncaught Error: Call to undefined function mysql_connect()

Regards,
Alec Smecher
Public Knowledge Project Team