Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've just installed all the modules necessary for the google analytic reports. When I go to configure the module, I am given this error.
Fatal error: Cannot redeclare class OAuthException in /sites/all/modules/oauth/lib/OAuth.php on line 8
Any help would be appreciated, thanks!
Comments
Comment #1
grendzy CreditAttribution: grendzy commentedCan you run the following command from your Drupal root to see if the class is in more than one file?
grep -r 'class OAuthException' *
Comment #2
stopshinal CreditAttribution: stopshinal commentedin root..
grep -r 'class OAuthException' *
returns
sites/all/modules/oauth/lib/OAuth.php:class OAuthException extends Exception {
Comment #3
Leksat CreditAttribution: Leksat commentedCheck out your php_info(). It might be that your php installiation has a OAuth extension containing OAuthException class.
Comment #4
raspberryman CreditAttribution: raspberryman commentedAlas, stopshinal, we need to all keep our eye out (and help patch) OAuth module. The goal is to emphasize PECL OAuth. My recommendation is to disable the OAuth PHP extension that you currently have. I'm also moving this issue over to the OAuth queue, but marking it as a duplicate.
Active issue: #1591692: Replace current OAuth library
Others:
#1439254: Fatal Conflicts with PHPs OAuth extension
#958126: Extra class OAuthException Declaration?