Magento – APC causes downloader error: Cannot redeclare class pear in /usr/share/php/PEAR/Registry.php

by c

If Magento’s downloader is showing

Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.

and Apache is throwing

[apc-error] Cannot redeclare class pear in /usr/share/php/PEAR/Registry.php on line 22.

make sure this is enabled in your /etc/php5/apache2/apc.ini file:

apc.include_once_override = 1

if that doesn’t work, you can disable APC in the downloader/ directory by putting

php_flag apc.cache_by_default Off

inside (magento root)/downloader/.htaccess.