I know RTFM but I have looked everywhere and cannot find an answer to this problem. Here is the problem:
*Upgrading form 4.6.8 to 4.7.3
*PHP 5.1
*MySQL 5.0

The error, I know it is common but I have reinstalled the themes in 4.6.8, made sure that set to bluemarine and still get this error:
user warning: Unknown column 'theme' in 'where clause' query: SELECT * FROM blocks WHERE theme = 'bluemarine' AND status = 1 ORDER BY region, weight, module in /var/www/html/drupal47/includes/database.mysql.inc on line 120.

Question:
What do I have to do to patch the database or the file to get around this error? I think that prior upgrades some how did not get installed correctly and therefore this one is a no go.

I have also converted the database from latin1 to utf8, this did not make a difference.

Thanks in advance!
Ken

Comments

kennyg’s picture

I can install a fresh 4.6.8 and try to upgrade it to 4.7.3 and get exactly the same error. This is a multi-site installation. Could the problem be related to multi-site installations where the config files are under sites/domainname/settings.php?

Or? Is this an un-reported bug? Any comments from others having multi-site upgrade problems would be appreciated.

kennyg’s picture

This is the first error before I go to the summary:
An HTTP error 406 occured. update.php?op=do_update
There are file folders under drupal/files/tmp and also under each sites/domain/files/tmp
Ideas?

kennyg’s picture

Here are the httpd access logs, if this will help:
"GET /update.php HTTP/1.1" 200 1403
"GET /update.php?op=selection HTTP/1.1" 200 4067
"GET /misc/drupal.js?1156430311 HTTP/1.1" 200 9013
"GET /misc/update.js?1156430311 HTTP/1.1" 200 1288
"POST /update.php?op=selection HTTP/1.1" 200 885
"GET /misc/drupal.js?1156430314 HTTP/1.1" 200 9013
"GET /misc/progress.js?1156430314 HTTP/1.1" 200 3221
"GET /misc/update.js?1156430314 HTTP/1.1" 200 1288
"POST /update.php?op=do_update HTTP/1.1" 406 344

And httpd audit logs:
mod_security-action: 406
mod_security-message: Access denied with code 406. Pattern match "!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)" at HEADER("Content-Type") [severity "EMERGENCY"]
0
HTTP/1.1 406 Not Acceptable
Content-Length: 344
Connection: close
Content-Type: text/html; charset=iso-8859-1
--0945ce1b--

kennyg’s picture

update.php will not run with mod_security enabled in apache.
Findout if it is installed:

rpm -qa |grep security

Results:

mod_security-1.9.4-1.fc5

Turn it off:

cd /etc/httpd/conf.d
mv mod_security.conf mod_security.conf.off
service httpd restart

Run update:

http://website.com/update.php

Then turn mod_security back on after you have completed your site updates:

cd /etc/httpd/conf.d
mv mod_security.conf.off mod_security.conf
service httpd restart

Success!

Standart’s picture

I have perfectly the same issue. I installed a fresh drupal-4.6.9, then ran the update script of drupal-4.7.3. The update script showed no errors but when I open any page I see user warning: Unknown column 'theme' ....

I use Apache-2.2.2, PHP-5.1.6 and MySQL-5.0.24a - no mod_security. Any ideas what else could cause this problem? What in mod_security prevents the database update?