Fatal error: Cannot redeclare _PEAR_call_destructors() (previously declared in /usr/share/php/PEAR.php:735) in /www/htdocs/w010699b/de/wsk/prod/cms-crm/sites/all/modules/civicrm/packages/PEAR.php on line 811

Every time I do a module update I get this error message. With a second or third attempt, the system did a clean start again without this error. Today, after updating metatags, I couldn't start the webpage anymore due to this error.

So I renamed pear.php in civicrm/packages to pear.php.bak which let me access the homepage. Selecting another page resulted in errors due to the missing pear.php. So I renamed pear.php.bak back to pear.php and now it works correctly.

Obviously after a module update there is an attempt to declare pear functions a second time. But why? And how may I find what causes this error?

4 Answers 4


If you only have one copy of CiviCRM, try disabling the other drupal modules you have on the site. It is possible that some other module also uses PEAR and has its own copy of it which could cause the above error

  • Donald, if there would be a conflict with another module using pear I suppose this error must occur every time the site is called, right?. But it occurs only after the update of a module and after issuing a workaroud (like closing the site in the browser and calling it again or renaming pear.php in modules/civicrm/packages one time and after calling the site changing it back to the original and call the site again) it vanishes and the site works as expected.
    – chrisly49
    Jun 1, 2015 at 7:38
  • not necessarily. It depends on who requires that specific file and under what conditions. So its likely that someone is including pear.php only under an update condition Jun 1, 2015 at 16:34

Please ensure that there is one and only one copy of CiviCRM in your sites/*/modules directory. Renaming the old copy when upgrading is not enough, you must either delete it or move it out of your modules directory.

  • There is only one copy in the site/all/modules. However this is a multi site installation with two urls using civicrm. The files/civicrm files are kept in the url's indivudal folders: site/url1/files/civicrm and site/url2/files/civicrm..
    – chrisly49
    Jun 1, 2015 at 7:32

Been working on this the past few hours.

In our case, we had been using OG Mailinglist and Civi. It had been working for a year with this added to my php.ini file:

include_path = ".:/home/example/public_html/sites/all/modules/civicrm/packages:/usr/lib/php:/usr/local/lib/php"

After some upgrades over the weekend, we were having some issues with mail. Today I added this line to sites/default.settings.php:

ini_set("include_path", "sites/all/modules/civicrm/packages");

Everything appears to be functioning at the moment.


I have had the same error with a similar set of two sites each with all their own folders running on the same host.

I just upgraded drupal 7.39 to drupal 7.40 and then civicrm 4.6.8 to civicrm 4.6.9 with the same error mentioned above. .. I tracked it down to the PEAR.php file and have been getting that error for a long time - every time I upgrade civicrm. I have searched my entire set of folders from the host top level and have a PEAR.php AND a PEAR5.php (both) under each site's civicrm packages folder. .. I've been renaming the PEAR.php file every time I upgrade civicrm for more than a year. .. And each site for each has all it's own drupal folders so no overlap - I update each site's folders independently (since understanding the old drupal multi-site will be deprecated in the future). .. If this is because I have two sites with separate folders for drupal and civicrm, it seems like the PEAR.php error should be independent too - where is the PEAR update happening?

[Error: undefined]

The civicrm upgrade from 4.6.8 to civicrm 4.6.9 is the first time that this new error occured

Exception: "Queue runner must be configured before execution. - onEnd"

0 /home/jandbweb/public_html/jandbweb/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php(106): {closure}()

1 /home/jandbweb/public_html/jandbweb/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php(102): CRM_Queue_ErrorPolicy->call(Object(Closure))

2 internal function: CRM_Queue_Page_AJAX::onEnd()

3 /home/jandbweb/public_html/jandbweb/sites/all/modules/civicrm/CRM/Core /Invoke.php(278): call_user_func((Array:2))

4 /home/jandbweb/public_html/jandbweb/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:4))

5 /home/jandbweb/public_html/jandbweb/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:5))

6 /home/jandbweb/public_html/jandbweb/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:5))

7 internal function: civicrm_invoke("upgrade", "queue", "ajax", "onEnd")

8 /home/jandbweb/public_html/jandbweb/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:4))

9 /home/jandbweb/public_html/jandbweb/index.php(21): menu_execute_active_handler()

10 {main}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.