Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Cannot redeclare class after upgrade or installation of 3.0.0 #11054

Closed
zubfatal opened this issue Dec 20, 2016 · 6 comments
Closed
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@zubfatal
Copy link

Initially I installed Piwik 3.0.0, worked fine although some widgets failed to render, throwing "Fatal error: Cannot redeclare class" errors.

I tried installing 2.17.1 and everything just worked, from within Piwik I attempted to upgrade to 3.0.0, which also worked, but again the same problems occurred.

From the dashboard of the tracked website:

Visits over time
Fatal error: Cannot redeclare class Piwik\Plugins\CoreVisualizations\Visualizations\Graph in /var/www/clients/client1/web8/web/piwik2/plugins/CoreVisualizations/Visualizations/Graph.php on line 26

Visits overview
Fatal error: Cannot redeclare class Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable in /var/www/clients/client1/web8/web/piwik2/plugins/CoreVisualizations/Visualizations/HtmlTable.php on line 23

Referer types
Fatal error: Cannot redeclare class Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable in /var/www/clients/client1/web8/web/piwik2/plugins/CoreVisualizations/Visualizations/HtmlTable.php on line 23

  • Debian 8.6
  • PHP 5.6.29 (php-fpm)
  • MySQL 5.5.53
  • nginx 1.6.2
@zubfatal
Copy link
Author

Moved the contents of the subfolder (/web/piwik2) to web root (/web) and it worked fine for 2-3 hours but it seems the errors have begun to popup again.

@tsteur
Copy link
Member

tsteur commented Dec 20, 2016

Maybe have a look at #10378

Is maybe opcache and xcache enabled?

@mattab
Copy link
Member

mattab commented Dec 26, 2016

As @tsteur pointed out, this sounds like a PHP cache issue. #10378

@mattab mattab closed this as completed Dec 26, 2016
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Dec 26, 2016
@zubfatal
Copy link
Author

@tsteur @mattab you're both right - now I haven't been looking at this setup daily, just every now and then, and since i added the PHP setting opcache.enable off for the site, I haven't experienced these errors.

@orrumar
Copy link

orrumar commented Sep 15, 2018

Che significa? come posso risolvere??
Fatal error: Cannot redeclare class Requests in /home2/masterwe/Public_html/marketerstart.com/wp-content/plugins/Aliplugin/libs/Requests/Requests.php on line 21

@orrumar
Copy link

orrumar commented Oct 9, 2018

come posso risolvere errore Aliplugin/libs/Requests/Requests.php on line 21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

4 participants