OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



PHP Fatal error: Cannot redeclare class UsageStatsReportPlu

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

PHP Fatal error: Cannot redeclare class UsageStatsReportPlu

Postby wallygva » Fri Dec 20, 2013 11:37 am

I just ran the patch to move from 2.4.2 -> 2.4.3 and everything is fine except for the Site Settings page...it comes up blank. Working through the forum posts, I discovered I need to check my logs for errors. Found this:

[Fri Dec 20 13:29:20 2013] [error] [client 129.174.55.237] NOTICE: Constant OJS_METRIC_TYPE_COUNTER already defined (/volumes/1TB/htdocs/ojs/plugins/generic/usageStats/UsageStatsReportPlugin.inc.php:19), referer: http://journals.gmu.edu/index/admin
[Fri Dec 20 13:29:20 2013] [error] [client 129.174.55.237] PHP Fatal error: Cannot redeclare class UsageStatsReportPlugin in /volumes/1TB/htdocs/ojs/plugins/generic/usageStats/UsageStatsReportPlugin.inc.php on line 21, referer: http://journals.gmu.edu/index/admin

Not so worried about the NOTICE but the Fatal error in the next line...that's a problem.

Server OS: Mac OSX Server 10.8.5
PHP: 5.3.27
Apache: 2.2.26
Mysql: 5.1.72

Things ran fine under 2.4.2 so something about the code change for 2.4.3 introduced this issue.

Later, I went to another machine running OJS 2.3.8 and ran a patch upgrade. When completed, the same symptom/log_error shows up if I hit the "site settings" page.

on that box:

OS platform Darwin
PHP version 5.3.19
Apache version Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.1c DAV/2 PHP/5.3.19 Phusion_Passenger/3.0.19
Database driver mysql
Database server version 5.0.92
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm

Re: PHP Fatal error: Cannot redeclare class UsageStatsRepor

Postby wallygva » Wed Jan 29, 2014 5:05 am

Just a quick update. Today (1/27) I made backups of my mysql database and the /ojs directories and then re-downloaded and reran the patch file and the database update.php sequence. Some problems were fixed by the database upgrade and others disappeared after the patch was applied a 2nd time (answering "Y" to every "this has already been done" comment from the patching routine).
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm

Re: PHP Fatal error: Cannot redeclare class UsageStatsRepor

Postby wallygva » Thu Jan 30, 2014 12:41 pm

Sorry...turns out this wasn't fixed after all. I somehow reversed a patch and got back to 2.4.2 code which made the problem "disappear" but once back on a solid 2.4.3 codebase it was back. See later note: viewtopic.php?f=8&t=11508
wallygva
 
Posts: 10
Joined: Mon May 16, 2011 12:18 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 4 guests