Closed (duplicate)
Project:
CAS
Version:
5.x-2.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2008 at 15:56 UTC
Updated:
29 May 2009 at 17:17 UTC
I have the following:
drupal 5.6
Civicrm 1.9
phpCAS files 5.1
When I go to the admin modules list after unpacking all the files I get:
Fatal error: Cannot redeclare class PEAR in /civicrm/packages/PEAR.php on line 103
Civicrm doesn't throw the error without the files being unpacked.
Comments
Comment #1
metzlerd commentedI don't really think that this is CAS related bug. Your error message points to a problem in civicRM. Is there something that would make you believe that this is a CAS module problem. Happy to help, but can you tell me what makes you think this is related to CAS?
Dave
Comment #2
epicflux commentedWhen I unpacked the CAS module, along with the phpCAS files this error appears, when I delete them the error doesn't appear... I just assumed it had something to do with the CAS module since I've setup a lot of other modules alongside CiviCRM and never experienced this issue.
Since you have a better understanding of how the CAS system works you might be better at spotting the issue, but it certainly could solely be a CiviCRM issue.
Do you know if anyone else has setup this module along side CiviCRM?
Comment #3
metzlerd commentedMy best guess is that the cas client is using pear and so is civicrm. I do know that the module code doesn't directly do anything with PEAR. So I'm at a loss as to how to advise you. Are you putting supporting libraries in your include path, or are you downloading third party PEAR extensions and putting them in the modules directory? If this is the case I might be able to sort this out, but if it isn't then there isn't much I have control of here. I can't find any direct includes or class definitions in my version of the phpCAS client. So I'm betting civicrm is trying to overload some PEAR definitions. If that's true you may need to get the civicrm pear functions into your php include path in order to sort this out.
It's certainly uncommon for drupal modules to use PEAR database extentions, so it doesn't surprise me that you haven't had this problem with other modules.
Am I helping or making sense here?
Comment #4
c960657 commentedCiviCRM comes with its own copy of PEAR, so what probably happens is that CiviCRM loads its own copy of PEAR.php and some other module loads another copy, possibly the copy installed globally on the server.
I'd prefer that CiviCRM could use the global copy of PEAR, but I haven't looked into whether this is possible/recommended.
Comment #5
metzlerd commentedchanging this issue to won't fix since there's not something I can do. There's a feature request for eliminating the phpCAS libarary at http://drupal.org/node/396916 so further progress towards removing any pear dependencies can be tracked there.