In attempting to install the APC module in a Drupal 7.14 multisite environment, I encountered the following error message when attempting to access actual Drupal nodes after what appeared to be a successful and problem free install of the APC module:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dotnet-tactix.trigger_assignments' doesn't exist: SELECT ta.aid, a.type, a.label FROM {trigger_assignments} ta LEFT JOIN {actions} a ON ta.aid = a.aid WHERE ta.hook = :hook ORDER BY ta.weight; Array ( [:hook] => node_view ) in trigger_get_assigned_actions() (line 171 of /var/www/vhosts/

The following code was placed in the settings.php file:

 * Add APC Caching.
$conf['cache_backends'] = array('sites/all/modules/contrib/apc/');
$conf['cache_default_class'] = 'DrupalAPCCache';
//$conf['apc_show_debug'] = TRUE;  // Remove the slashes to use debug mode.

I've also confirmed the APC module code is available in the sites/all/modules/contrib folder.

Removing the APC code from the settings. php file and updating the file on my host server eliminates the error message and the site functions normally. I've tested and retested this to confirm.

Please let me know any additional information you need to investigate this, or whether you feel I should be looking in a different direction given the information presented. Thanks!


sharifudinrizal’s picture


R.Muilwijk’s picture

Status: Active » Postponed (maintainer needs more info)
twistor’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Needs work

I'm guessing this is happening during a re-install.

If you drop the database and re-install, apc isn't aware of this and thinks lots of modules are still enabled.

There are a few options:

  1. Document that you shouldn't use apc during install.
  2. Document that the server should be restart before install.
  3. Detect when running from update.php via $_SERVER['SCRIPT_NAME']

The last option would work, but it complicates the code for a one-time thing.