Upgrade issue from 3.0.0 to 3.0.2

I’m currently trying to upgrade from 3 to 3.0.2, but when I run the command to upgrade the database I get this error:

PHP Fatal error: Cannot redeclare class ReviewReportPlugin in /var/www/html/plugins/reports/reviews/ReviewReportPlugin.inc.php on line 132

What could be causing this? I’ve copied over the files for the upgraded version.

Thanks
Mike

Hi @mickbale,

It sounds like you have two copies of ReviewReportPlugin.inc.php in your codebase. Is it possible you somehow mixed your OJS 3.0.0 and 3.0.2 code together? Your install should only contain the 3.0.2 code, not the 3.0.0 code, for the upgrade to work properly.

Regards,
Alec Smecher
Public Knowledge Project Team

image

No just the one version - I replaced the files with the ones in the version 3.0.2 package, so no merging or anything.

Hi @mickbale,

What about in plugins/reports/reviewReport/ReviewReportPlugin.inc.php or some other directory?

Regards,
Alec Smecher
Public Knowledge Project Team

I did a search and found there were 3 of those files - but they would have been copied over from the whatever was in the upgrade folder, which is odd if they shouldn’t be there. They were found in:

tools/plugins/reports/reviewReport
plugins/reports/ReviewReport
plugins/reports/reviews

Which one should I delete? I tried deleting two, but it did nothing, I get a blank white page when clicking the upgrade button.

Thanks for your help

Hi @mickbale,

You should start with a clean directory containing the OJS 3.0.2 code. If you’ve got three different copies of the review report plugin, that suggests you’re mixing your old code into the clean code, which will cause problems like this.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok, I’ve started from scratch, I’ve got a copy of my theme, I’ll add it back in later. I deleted everything and copied over everything from v3.0.2, but now I get this error:

DB Error: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

I’m not a developer, so I have no experience with MySQL or databases

Just found out you’re releasing a bigger update next month - v3.1, so I’m going to wait for that to be released and try again haha, thanks for your help!

Hi @mickbale,

The OJS 3.1 update shouldn’t affect that error message – it’s a PHP/MySQL configuration issue. See e.g. Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38) - Stack Overflow for details.

Regards,
Alec Smecher
Public Knowledge Project Team