I'm a subscriber to Acquia network service and I tried to set up this module on my website. I enabled acquia_agent and acquia_spi modules and updated the settings with my subscriber info. Then I used the drush cron command and got the following error:
Fatal error: Cannot redeclare security_review_run()
It turns out that acquia_spi module contains a file security_review.inc which has apparently been copy and pasted from Security Review module. It contains a bunch of the same exact function declarations and therefore creates a bunch of namespace conflicts.
I'm filing this issue as a bug report, but it's apparently very intentional. The whole file is one big namespace conflict, it can't just be an accident. I re-read the instructions for this module thinking maybe there was a warning about not installing both modules at the same time, but I don't see any directions like that. And the issue is not just that they shouldn't both be enabled at the same time, but apparently they both can't be installed in the codebase together, even when turned off.
To make matters more difficult, these two modules do not have the same exact functionality. Acquia Network Connector has some overlap with Security Review, but they also have differences, which makes it even more problematic that they can't both be installed simultaneously. I would like to take advantage of my Acquia subscription, but I also would like to use Security Review module, and apparently I can't do both.
Can someone please explain what's going on here?
Thanks,
Eric
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | acquia-connector-1427982.patch | 61.01 KB | coltrane |
Comments
Comment #1
ericbroder commentedChanging priority to major since this doesn't affect users who do not have Security Review module installed.
Comment #2
coltraneWhat version of the Security Review module are you using?
Comment #3
coltraneYou can use both together, just need to be running 6.x-1.2
Comment #4
ericbroder commentedThanks for the feedback. I now suspect that there is something wrong with my sandbox, since I am getting many different php errors, and can't consistently replicate the issue I reported here. See: http://drupal.org/node/1208618#comment-5583498
Comment #5
ericbroder commentedApparently the problem is not just my sandbox because this error suddenly reappeared for the first time in weeks on our production server. We have Security Review 6.x-1.2 and Acquia 6.x-2.1.
I don't know how to replicate it consistently. Sometimes I get this error:
From reading the code, the error makes sense to me because it does appear to be redeclaring an existing function. I don't know why it's not consistent and why no one else seems to be reporting this problem. I'm using PHP 5.2.13 on our production server.
Comment #6
coltrane@ericbroder 2.2 of Acquia Connector will be out in the next couple weeks. I'll work on a more explicit check for it so this doesn't happen.
Comment #7
ericbroder commentedThanks coltrane, I'll keep an eye out for it.
I'm also curious, why is it that this module doesn't follow the namespace convention? I'm just as confused as anyone why this error is so inconsistent, but the general naming convention seems pretty clear to me:
ref: http://drupal.org/coding-standards#naming
Comment #8
coltraneShould be fixed in 2.2
Comment #10
waynejon commentedReporting experiencing this issue with an update to 6.x-2.4.
Summary: a recent update of the Acquia Connector module from previous version to release 6.x-2.4 has created incompatibilities with the Security Review module. See below:
Fatal error: Cannot redeclare security_review_run() (previously declared in /docroot/sites/all/modules/contrib/acquia_connector/acquia_spi/security_review.inc:19) in /docroot/sites/all/modules/contrib/security_review/security_review.inc on line 41
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare security_review_run() (previously declared in
/docroot/sites/all/modules/contrib/acquia_connector/acquia_spi/security_review.inc:19)
/docroot/sites/all/modules/contrib/security_review/security_review.inc, line 41
WD cron: Cron run exceeded the time limit and was aborted.
Following related enabled modules with conflicts:
Acquia Network Connector Acquia agent (acquia_agent) Module Enabled 6.x-2.4
Acquia Network Connector Acquia Site Profile Information (acquia_spi) Module Enabled 6.x-2.4
Other Security Review (security_review) Module Enabled 6.x-1.2
Comment #11
FunkMonkey commentedI can verify the same behavior as waynejon after an update to 2.4. Cron will not run.
Comment #12
coltraneI can't replicate this so I suspect there's something specific to your environment and installation that causes this. Can you list enabled modules and details of your environment such as os and php version? How is cron being called?
Comment #13
FunkMonkey commentedIn my case it was just a matter of disabling Security Review module and fully removing the files from /sites/all/modules to get cron working again correctly. I have no idea why the 'cannot redeclare security_review_run()' would prevent cron from finishing.
Would fixing the problem be as simple as changing that function name to something different? acquia_security_review_run() or something like that?
I was calling cron manually with 'drush cron'. Running OpenSuse 12 and php 5.3.8.. Let me know if you still want a modules list. It definitely seems to be Security Review though.
Thanks.
Comment #14
coltraneTry this patch out while having the Security Review module enabled. It applies to Acquia Connector 6.x-2.x
Comment #15
coltraneCommitted to 6.x-2.x http://drupalcode.org/project/acquia_connector.git/commit/133cca5 and 7.x-2.x http://drupalcode.org/project/acquia_connector.git/commit/6077786