Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

apc-error in Upgrading Drupal from 7.0-rc1 to 7.0

Parent Feed: 

I ran into an odd error upgrading Drupal from 7.0 RC1 to 7.0. The following is the message in apache's error log:

[Mon Jan 17 13:49:47 2011] [apc-error] Cannot redeclare class queryconditioninterface in 
/var/www/drupal-core/drupal-7.0/includes/database/database.inc on line 1648.

The solution is to temporarily disable APC (for example, by commenting out the relevant lines in the PHP configuration. In my particular case, this in /etc/php5/conf.d/apc.ini).

Version info:

PHP Version 5.3.2
Ubuntu 10.04
APC 3.1.3p1
Apache 2.2.14

Postscript. This problem seems to be caused by APC's handling of require_once. I'd set up APC to optimize this handling, and it seems that something in either the new Drupal code, or the updated APC behaviour, is incompatible with the optimization, because the problem cropped up again with the newly installed Drupal 7 after I re-enabled APC.

For now, it appears that the fix is to turn off the include_once optimization: apc.include_once_override = 0

The moral of the story is: turn off opcode caches and acceleration while upgrading. Is that written in the installation/upgrade instructions? Maybe it should be...

Author: 
RSS Tags: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web