Everything seemed to be running fine on a fresh install of FreeBSD 9.0, Apache 2.2.22, MySql 5.5.27, PHP 5.3.17.

That was when I moved hardware around, which included powering down the server and to move the power cable to a batter-backup unit. It seemed like a good idea at the time.

When I came back online, some of my sites were fine, while others seemed to have suddenly developed database problems that I haven't been able to sort out. Two of the errors are similar; one is different from the others.

I tried repairing tables in PhpMyAdmin, without success. MySql data files at /var/db/mysql are owned by mysql (user and group).

The max_allowed_packet value in my.cnf file is set to: max_allowed_packet = 100M.

All sites except for the one indicated (*) are Drupal 7.16, with up-to-date modules.

These are the problem sites (see error messages below):

http://carmenrue.com
http://ellarue.com
http://choicesmhc.com

These sites appear to be working fine:

http://tomrue.net
http://njforestry.org
http://renusethjerathmd.com
http://archive.carmenrue.com * [Drupal 5.23]

If anyone can offer any advice, it would be sincerely appreciated.

============== ERROR MESSAGE ================

Error

The website encountered an unexpected error. Please try again later.
Error messagePDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'carmenrue.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 24.161.18.74 ) in drupal_is_denied() (line 1910 of /usr/local/www/carmenrue.com/includes/bootstrap.inc).

============== ERROR MESSAGE ================

Error

The website encountered an unexpected error. Please try again later.
Error messagePDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ellarue.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 24.161.18.74 ) in drupal_is_denied() (line 1910 of /usr/local/www/ellarue.com/includes/bootstrap.inc).

============== ERROR MESSAGE ================

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lmhc.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 24.161.18.74 ) in drupal_is_denied() (line 1910 of /usr/local/www/choicesmhc.com/includes/bootstrap.inc).

Additional

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lmhc.cache_bootstrap' doesn't exist: DELETE FROM {cache_bootstrap} WHERE (cid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => variables ) in cache_clear_all() (line 176 of /usr/local/www/choicesmhc.com/includes/cache.inc).

============================================

Comments

you are missing tables

Specifically

  • lmhc.blocked_ips
  • lmhc.cache_bootstrap
  • ellarue.blocked_ips
  • carmenrue.blocked_ips

If you haven't many any software modifications (drupal version, added/removed modules) then it could be that some of your tables have become corrupted. This can easily happen when a mysql server is not shut down cleanly.

I tried repairing tables in PhpMyAdmin, without success.

Can you tell us more about what commands you tried, and what the result was? If you have db backups of your site, restoring these may be easier than trying to repair damaged tables.

PhpMyAdmin

Thanks for replying.

Using the PhpMyAdmin interface, REPAIR TABLE, for all tables in the database. Indication was that it worked OK.

I tried restoring (rm -r followed by cp -r /var/db/mysql) two different backups (one created 10/28/2012 and the other 9/23/2012), making sure to chmod and chgrp to "mysql", with one of the databases.

Same result, no change, still stumped.

--
http://tomrue.net

# FreeBSD 9.0, Apache 2.2.22, MySql 5.5.27, PHP 5.3.17
# Drupal 7.16

=-=

=-=

open update.php what is $update_free_access set to? if set to TRUE, set to FALSE and test.

were these problem sites currently on Drupal 7 upgraded from Drupal 6? and if so when you updated the sites are you sure you ran update.php? have you run it again since to make sure you didn't miss any updates?

if you google durpal blocked_ips table, there are many results for this issue filed in the issue queue which indicate that the upgrade from D6 to D7 wasn't performed properly and would explain why you are missing tables that are native in D7. Though that doesn't at all explain why the D5 site would be displaying these same errors. However, I'm baffled by how a D5 site is running in PHP 5.3. PHP 5.3 deprecated some functions that D5 utilized and D5 was never reworked to deal with those function removals.

If $update_free_access

If $update_free_access doesn't help, here is some more info on it that might help. upgrade to 7.0 gives: 'MYDBNAME.blocked_ips' doesn't exist Are they running behind some kind of proxy that could have a corrupt cache?

I'm still kind of new to Drupal, wish I could be of more help.

Anyone who claims to be in the light but hates his brother is still in the darkness.
John 2:9

"Let there be light."
Genesis 1:3

nobody click here