Fatal error: Cannot redeclare class MCAPI in sites/all/modules/mailchimp/MCAPI.class.php on line 2.

I got this error at admin/reports/status/run-cron on cron page.

Comments

JordiTR’s picture

I'm also having this message on the same circumtances and I can't execute cron except if I desactivate the module. Any idea?

JordiTR’s picture

Finally I've discovered that the mistake was having Mailchimp module and EMF (Email Marketing Framework) module active at the same time. That was the configuration of a customer which I respected because I had no previous experience with those modules. But the point is that both module include the mentioned MCAPI.class.php, and both are different versions (despite announcing to be the same version but with different number of lines...).

All in all was so easy to solve as discovering that the customer prefered the Mailchimp module, and once EMF was unistalled the problem stopped. The point is that you should select to use one or the other. Now it was obvious, MCAPI.class.php was loaded twice and with different code, at some point the system had to complain!! :-)

Well, at least this has been my experience, hope it help others :-)

Thanks a lot for the Mailchimp module!

YesCT’s picture

Title: Error at cron run page » Error at cron run page: Fatal error: Cannot redeclare class MCAPI
Issue summary: View changes
Status: Active » Fixed

looks like solution was posted in #2.

If that does not solve this, please open another issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.