Previous version - 6.20

Getting the following error when running update.php:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'TRADITIONAL' in drupal_get_installed_schema_version() (line 151 of /path/to/drupal/includes/install.inc).

Comments

DaleEMoore’s picture

Twice now in the last 24 hours I've attempted to upgrade a Drupal 6.20 site to version 7 encountering the same failure each time. I've used http://drupalcode.org/viewvc/drupal/drupal/UPGRADE.txt?view=markup to prepare and everything works fine until I run update.php.

http://datapoint.org/drupal7/update.php
Fails pointing to http://datapoint.org/drupal7/update.php?op=info and returning:

Server error.
The website encountered an error while retrieving http://datapoint.org/drupal7/update.php?op=info. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this web page later.
  More information on this error
Below is the original error message
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

Then browsing to http://datapoint.org/drupal7/ gets:

datapoint.org
Error
Error messagePDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'datapoint7.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 70.125.134.190 ) in drupal_is_denied() (line 1779 of /home/content/86/7118286/html/drupal7/includes/bootstrap.inc).
The website encountered an unexpected error. Please try again later.

The MYsql database connections settings are the same I used to create and import this test db I'm using to evaluate the upgrade to d7. I am very glad I didn't try this on my LIVE site!

I look forward to hearing from you,
Dale E. Moore

Anonymous’s picture

I've seen the second error (SQLSTATE[42S02]) once when I tried to update a copy of a live site. My solution was to wipe the copy DB and try all over again. I'm not aware of why the error occurs though, but to me it seems like it occurs when I try to update a site two times, after the first time had an error. D7 is still only RC, so I think this will be fixed before the release.

DaleEMoore’s picture

Hi Fyrsten; I didn't upgrade, then upgrade again as you did. I copied the db, upgraded, got the failure. Then copied the db to a different db, upgraded and got the failure again.

I don't understand how drupal 7 can have no critical errors when it won't upgrade from 6 to 7. This seems very confusing to me.

Bob Stein’s picture

I'm getting the "blocked_ips" table not found error you describe in the bottom half of your post, also when upgrading from Drupal 6.20 to Drupal 7 RC3. According to this thread, the problem has existed since last summer. I've tried wiping/reinstalling a backup copy of the database, but same result.

smscotten’s picture

Same here with d6.20 to d7-rc4

EmpireNM’s picture

With d6.20 to d7.0

EmpireNM’s picture

Seems I got this error because of using the D7 default settings.php file. This happened because I was attempting to try the upgrade with an existing database, but on a separate test installation. When I uploaded the old settings file from the D6 installation, to replace the D7 one, the upgrade worked without this error.

JoachimVdH’s picture

Drupal 6 installation is no problem, a clean install of drupal 7 is no problem.
But none of the existing sites can be upgraded from the most recent drupal 6 to drupal 7, then i get the internal error 500.
if i refresh the front page, it's always a pdo problem and most of the time is has to do with a non existing table : blocked_ips

hope there will be a solution soon,

Joachim

pclb.de’s picture

I experienced the same problem twice trying to upgrade an existing site, exactly following the procedure on http://drupalcode.org/viewvc/drupal/drupal/UPGRADE.txt?view=markup.
The error reads:

PDOException: SQLSTATE[HY000] [2005] Unknown MySQL server host 'localhost:3306' (1) in drupal_get_installed_schema_version() (line 151 of /is/htdocs/wp10000000_I72WMWPG3F/www/customer/includes/install.inc).
The website encountered an unexpected error. Please try again later.
Are there any solutions or workarounds?
Can I do a clean install and then transfer the existing site?
Thanks in advance,
Markus!

porg’s picture

I had the exact same issue as @DaleEMoore!
I thought that I clearly followed the rules from UPGRADE.txt.
But my mistake was, that I had very few **CONTRIBUTED MODULES STILL ON** !

SOLUTION: Disable **ALL** contributed modules, before running /update.php within the Drupal 6 to 7 upgrade process!
Disabling all contributed modules at once, can be done through a single MySQL database command:

UPDATE system SET status = 0 WHERE filename LIKE "sites%"
heine’s picture

To answer the OP ; your MySQL version is the likely cause. See the requirements.

(to the thread-hijackers - just because your error also has "pdo" in it doesn't mean it is the same problem - please read the entire message, and search for matching threads, or post new ones.)

pclb.de’s picture

Hello,
I just checked my MySQL Version. It reads: 5.1.49-3~bpo50+1-log.
So it seems the database version is quite new.
My ISP is Host Europe, any known bad experiences with them and Drupal 7.0?
Thanks again,
Markus

heine’s picture

You do NOT have the problem described by the OP.

erok415’s picture

I hope this get's fixed soon for those of us running Windows servers.

E

Ain't it great....!