I did some testing tonight and found 2 problems to with the upgrade from D6 to D7.

1. The block_ips table is breaking the upgrade. Their is an exception which is being fired is being caught by something else, when drupal_bootstrap(DRUPAL_BOOTSTRAP_ACCESS); is being called. I did find that you can set in the conf to get the blocked_ips from a variable instead of the table.

2. The role_permission table is also breaking the upgrade, and by creating it, it fixes the issue.

I have created a patch and with a basic system it will upgrade with no problems.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Issue tags: +Needs manual testing

Note this will need manual testing since the testbot does not do 6->7 upgrades.

Damien Tournoud’s picture

The 'blocked_ips' part should be already taken care of. The change seems like a won't fix.

Not sure about the 'role_permission' part. The upgrade path has been manually tested a few weeks back, and there was no issue with that. I'm not sure what changed that could break the upgrade path.

gordon’s picture

Title: Upgrading from Drupal 6 to Drupal 7 is failing. » Upgrade failing if blocked_ips doesn't exist
FileSize
1.42 KB

I have split this out into 2 patches.

If the blocked_ips table doesn't exist when you are upgrading then you get a WSOD.

There was an attempt to catch the exception un the update.php but this is not working because any exception raised during an DatabaseConnection::query() (specifically the PDO::execute()) are being caught there and not back in the update.php

What I did find in the drupal_is_denied() you can have a variable_get('blocked_ips') which will be used instead of querying the table. So I preloaded this directly into the global $conf so it doesn't save back in the database.

Dries’s picture

That seems to work. There is a tiny coding style error though. Need an extra space before '+='. I can fix that before the commit, once this is marked at RTBC.

gordon’s picture

Oops. I have fixed the formatting issue.

David_Rothstein’s picture

I am not able to reproduce this bug. I just tried updating a D6 site to D7 and had no problems at all... I also did some debugging to verify that the exception was being caught in update.php as intended, and it was.

What are the specific steps needed to encounter this?

Also, if there is somewhere else further down that in some cases is catching this exception too early and doing something with it that it shouldn't, we should probably look at that code to see if the problem can't be fixed there...

gordon’s picture

My test is an upgrade of a more or less clean Drupal 6 install and then running the upgrade to Drupal 7.

Before I copy in my Drupal 6 database I make sure that all the tables are removed. As you should also be getting the error when the role_permissions doesn't exist.

Also I am running on PHP 5.2.5 (not sure if this will make a difference) but I know there are issues with 5.2.9, (I have not tested 5.2.10)

Now when I running the below code the exception is caught by the inner try and not the outer.


try {
  try {
    throw new Exception('Division by zero.');
  }
  catch (Exception $e) {
    echo 'inner';
  }
}
catch (Exception $e) {
  echo 'outer';
}

Lastly my solution I feel is much cleaner than using the exception catching as we can just turn off the requirement for the blocked_ips table.

Damien Tournoud’s picture

@gorbon: the PDOException should bubble up to update.php... what makes you think there is a inner try/catch? can you pinpoint it?

gordon’s picture

1 thing that it may be is that I am running the upgrade as an anonymous user. I am having other problems with session as well.

gordon’s picture

I have done some more investigation and I can catch the exception at every level and re-throw it right back to though the bootstrap.inc and it is caught everytime but once I get into the update.php the exception is not caught.

Any ideas? I am not able to work out why this would be happening.

catch’s picture

@gordon - do you have devel module installed and enabled? The hook_boot() in devel calls user_access() which queries the role_permission table which blows up when it can't find it.

gordon’s picture

No the devel module is not enabled.

The problem that the exception is not being caught in update.php. The exception is caught in database.inc and bootstrap.inc (when I add the try...catch) but not in update.php

David_Rothstein’s picture

I've tried reproducing this a number of times, and can't get it to happen for me.

However, I can (on rare occasions) get the role_permission problem to occur -- I posted more info at #524710: role_permission required to upgrade from D6 to D7. Another error am I also seeing (also only sometimes) occurs in system_update_7020() and is this:

An error occurred.
Path: http://localhost/drupal/update.php?id=2&op=do
Message:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1949200998 bytes) in /home/droth/web/drupal/modules/system/system.module on line 1688

Call Stack:
0.0019 266540 1. {main}() /home/droth/web/drupal/update.php:0
0.2045 13622560 2. _batch_page() /home/droth/web/drupal/update.php:741
0.2051 13638676 3. _batch_do() /home/droth/web/drupal/includes/batch.inc:63
0.2051 13638676 4. _batch_process() /home/droth/web/drupal/includes/batch.inc:141
0.3945 13933820 5. call_user_func_array() /home/droth/web/drupal/includes/batch.inc:245
0.3945 13933820 6. update_do_one() /home/droth/web/drupal/includes/batch.inc:0
0.3945 13933820 7. system_update_7020() /home/droth/web/drupal/update.php:169
0.3945 13933820 8. drupal_install_modules() /home/droth/web/drupal/modules/system/system.install:1998
0.3945 13933820 9. system_get_module_data() /home/droth/web/drupal/includes/install.inc:483
0.4381 14129332 10. system_update_files_database() /home/droth/web/drupal/modules/system/system.module:1808

Trying to allocate on the order of 2 GB of memory?... hm....

The fact that there are so many fatal errors that people are getting during update.php but that cannot be reproduced consistently is, to say the least, a little troubling :) I have not found any pattern to when I see the above errors; it appears to occur almost randomly.

Status: Needs review » Needs work

The last submitted patch failed testing.

gordon’s picture

I have done some more work on this and I have found that in PHP 5.2.5 you get this problem where as this is resolved in PHP 5.2.6

I am not if we should the minimum requirement to run Drupal 7 should be 5.2.6 or 5.2.x.

The answer to this question will determine if this patch should be committed or not.

catch’s picture

I'm getting this on PHP 5.2.6 now - there was some bootstrap refactoring with the cache patch recently which might have changed the situation slightly.

David_Rothstein’s picture

Component: install system » update system
int’s picture

Status: Needs work » Needs review

The patch #5 still applys?

Status: Needs review » Needs work

The last submitted patch failed testing.

int’s picture

So, this patch is assigned to gordon, can you make this patch apply's to the current HEAD?

I want to test the update of my prodution site, to see the errors. Thanks..

mikl’s picture

I have the same problem on Apache/2.2.13 (Unix) PHP/5.2.10:

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal7_mikkel_hoegh.blocked_ips' doesn't exist' in /[…]/includes/database/database.inc:1734
Stack trace:
#0 /[…]/includes/database/database.inc(1734): PDOStatement->execute(Array)
#1 /[…]/includes/database/database.inc(567): DatabaseStatementBase->execute(Array, Array)
#2 /[…]/includes/database/database.inc(1822): DatabaseConnection->query('SELECT 1 FROM {...', Array, Array)
#3 /[…]/includes/bootstrap.inc(1348): db_query('SELECT 1 FROM {...', Array)
#4 /[…]/includes/bootstrap.inc(1361): drupal_is_denied('::1')
#5 /[…]/includes/bootstrap.inc(1481): drupal_block_denied('::1')\n#6 /[…]/includes/bootstrap.inc(1433): _drupal_bootstrap(1)
#7 /[…]/includes/update.inc(207): drupal_bootstrap(2)
#8 /[…]/update.php(272): update_prepare_d7_bootstrap()
#9 {mai in /[…]/includes/database/database.inc on line 1734

This is with the version here: http://github.com/mikl/drupal/commit/d128180ae17ea511b7b8b5437b847a2cc04... – latest HEAD at this point in time.

Damien Tournoud’s picture

Assigned: gordon » Unassigned

I confirm that the upgrade path is broken. Patch coming up.

int’s picture

that's nice, thank you

Damien Tournoud’s picture

#583008: IP address blocking does not work on update.php is part of the problem. The patch in there is probably a solution too.

gordon’s picture

It seems to be an issue with the version of Drupal. 5.2.10 has problems as you can't run the testing, 5.2.5 also has problems, but I have had success with 5.2.6 which is why I haven't really done much lately.

int’s picture

Yep, we don't have this problem any more.. But we have others, now when I update show this:

PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0

int’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

DaleEMoore’s picture

Component: update system » ajax system
Status: Closed (fixed) » Active

The block_ips table is breaking the upgrade from 6.20 to 7.0-rc3 as I have described here http://drupal.org/node/1006932#comment-3866950.

I wish it wasn't so,
Dale

Damien Tournoud’s picture

Component: ajax system » database update system
Status: Active » Closed (fixed)

Please do not reopen old issues like that. Your problem is most probably unrelated.

DaleEMoore’s picture

It's nice to hear from you Damien Tournoud. Did you look at my problem description? I mean, you might be right; but how would I know? Looking for some guidance from you other than SLAP don't do that. And any little hint would be appreciated!

cvdenzen’s picture

Version: 7.x-dev » 7.10
Status: Closed (fixed) » Active

Upgrading from 6.22 to 7.10 gives (on one of my 2 sites, but not on the other!):
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'web49-a-drupa-7.drupal_blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 84.81.200.16 ) in drupal_is_denied() (line 1856 of /home/sites/vandenzen.nl/public_html/drupal/includes/bootstrap.inc).

Everett Zufelt’s picture

@cvdenzen

Can you please let us know which version of PHP is running on the working and not working sites?

marcingy’s picture

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

FileSize
5.63 KB

Both sites run php version 5.2. They both run on the same server (your-webhost.nl).
The difference is that the site that did not complain was a redirected site (http://arjan.vandenzen.nl -> http://vandenzen.nl/drupal1). The complaining site is the root site http://vandenzen.nl with a modified .htaccess file.

Both sites run from the same Drupal codebase in /drupal.

I will attach the .htaccess in root directory, but I am not sure whether that is the version I had during the upgrades.

clemens.tolboom’s picture

I'm gettings this while upgrading through drush and some scripts.

Do you wish to run all pending updates? (y/n): y
The external command could not be executed due to an application error. [error]
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function ctools_include() in /.../sites/all/modules/views/views.module, line 988
Output from failed command  [error]
 
Fatal error: Call to undefined function ctools_include() in /.../sites/all/modules/views/views.module on line 988

Finished performing updates.                  [ok]
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'iafmd_d7.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array                                                         [error]
(
    [:ip] => 127.0.0.1
)

There are two tricky parts

1. The ctools_include used by views causes a error 500 (as all modules are disabled per instruction)
2. system_update_7003 is ran without a successful system_update_7002() which should create the block_ips table.

Due to the batches ran by drush the first batch failed and thus the second batch too?

I fixed this by

drush sql-query "update system set status=1 where name = 'ctools'"

then run drush updb again.

Note that people claiming 'cannot reproduce' have probably truncated all D7 clean install tables then ran the upgrade again this way preserving the block_ips table. This is probably what @DaleEMoore reported through #27 link to a forum topic.

Further steps to investigate:
- are views hook_update_N ran earlier to system_update_N ?
- is a internal server error 500 allowing batch API to continue ?

clemens.tolboom’s picture

Version: 7.12 » 7.10

I did not fixed it as ctools is now only enabled but not correct installed. The updates are ran until ctools wants to do it's business.

WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'iafmd_d7.ctools_css_cache' doesn't exist: DELETE FROM {ctools_css_cache} ; Array [error]
(
)
 in ctools_css_flush_caches() (line 567 of /home/iafmd/.../htdocs/sites/all/modules/ctools/includes/css.inc).
Cannot modify header information - headers already sent by (output started at /home/.../bin/drush/drush/includes/drush.inc:596) bootstrap.inc:1212 [warning]
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'iafmd_d7.ctools_css_cache' doesn't exist: DELETE FROM {ctools_css_cache} ; Array
(
)
 in ctools_css_flush_caches() (line 567 of /home/iafmd/.../htdocs/sites/all/modules/ctools/includes/css.inc).
Drush command terminated abnormally due to an unrecoverable error. [error]
The following updates are pending:

system module : 
  7067 -   Grant administrators permission to view the administration theme. 

But the site is lacking a WSOD so disable and uninstall ctools then enable again.

drush dis ctools
drush pm-uninstall ctools
drush en ctools
Hari’s picture

Status: Postponed (maintainer needs more info) » Needs review

drupal_upgrade.patch queued for re-testing.

marcingy’s picture

Status: Needs review » Postponed (maintainer needs more info)
eyersee’s picture

Hi, I have just conducted an upgrade from v6.23 to 7.12 and have encountered issues as per this issues report. I would like to know how I can utilise the patch script to try and test this as a fix to the issue. If you can please supply me with instructions it would be much appreciated.
Thank you
Ian

hewhocutsdown’s picture

Version: 7.10 » 7.12

update.php won't even load for me, but if I go to the website root, it displays:

OException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '[DBNAME].blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 10.8.2.21 ) in drupal_is_denied() (line 1895 of /var/www/includes/bootstrap.inc).

Attempting to apply the patch failed (HUNK #1 failed at state 528).

[Note: this is an upgrade from Drupal 6 to 7]

clemens.tolboom’s picture

Version: 7.10 » 7.12

In #36 I did not ran drush sql-query "update system set status=1 where name = 'ctools'" but I did drush sql-cli then executed SQL update system set status=1 where name = 'ctools';

Running the updates fails on comment update

comment module : 
  7002 -   Rename {comments} table to {comment} and upgrade it. 

...

Cannot rename <em class="placeholder">comments</em> to <em class="placeholder">comment</em>: table <em class="placeholder">comments</em> doesn't exist.
clemens.tolboom’s picture

Today I discovered my upgrade script failed to disable D6 modules due to a missing drush alias. (drush @site.d6 pm-disable `drush @forgotten.d6 pml --pipe --status=enabled --no-core`)

After disabling all none core modules this error disappeared :)

@hewhocutsdown: are you sure all none core modules are disabled?

mgifford’s picture

There are a few related issues I'm pointing to this. This looks like it's the closest.

I was also using drush @sites so perhaps it's related to that.

mntash’s picture

Can someone please let me know what the latest is on this?

I am having this same issue when upgrading to D7:

I run upgrade.php and get this error: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'domain_front.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 174.39.3.189 ) in drupal_is_denied() (line 1883 of /home/domain/public_html/includes/bootstrap.inc).

mgifford’s picture

It should be possible to just add it, though not sure that's going to address the root problem. Worth trying though.

CREATE TABLE `blocked_ips` (
  `iid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key: unique ID for IP addresses.',
  `ip` varchar(40) NOT NULL DEFAULT '' COMMENT 'IP address',
  PRIMARY KEY (`iid`),
  KEY `blocked_ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores blocked IP addresses.' AUTO_INCREMENT=1 ;
mstrelan’s picture

#46 works if you also put a return statement at the top of system_update_7002() in system.install, otherwise it will fail saying the table already exists.

vcrkid’s picture

So do #46 and #47 work? I'm afraid I have no real knowledge how to implement #47 apart from my own guess at it.

Any help? Has anyone figured this out yet?

KhaledBlah’s picture

I've seen this error message as well:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx.drp_blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 192.168.x.x ) in drupal_is_denied() (line 1895 of <path_to_drupal>/includes/bootstrap.inc).

It might be relevant to know that I use Drupal behind a reverse proxy.

#46 in conjunction with #47 seems to solve it.

NOTE: #46 is only for mySQL backends and there is no table prefix which users might overlook (I did).

KhaledBlah’s picture

As I said in #49 I use drupal behind a reverse proxy. The error message described in #49 went away once I set the "$base_url" variable in settings.php before I started the upgrade. Other may have similar problems.

vcrkid’s picture

Alright, I seemed to have gotten it to work at the end. I followed #46 and #47 (I'm using Acquia Dev Desktop btw) and I was still having problems - I got an error that seemed to be connected with the Domain Access module, so I changed that version to the Drupal 7 one and voila!

I'm not sure if this is an isolated case or if that comment might help others. Good luck!

gtwa’s picture

How do I do a return statement described at the top of system_update_7002?

I put the code from from #46 into my bootstrap.inc file (that seems right, could be wrong), I just don't know how to create said return statement described in #47. Please forgive me, I'm a beginner at this. Just learning my way through all the problems.

Here's my specific error code if it helps:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'gtwantennas_gtwd7.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 76.76.XXX.XXX ) in drupal_is_denied() (line 1895 of /home/gtwantennas/www/d7test/includes/bootstrap.inc).
The website encountered an unexpected error. Please try again later. 
gtwa’s picture

Would you help a wee novice?

How do I do a return statement described at the top of system_update_7002?

I put the code from from #46 into my bootstrap.inc file (that seems right, could be wrong), I just don't know how to create said return statement described in #47. Please forgive me, I'm a beginner at this. Just learning my way through all the problems.

Here's my specific error code if it helps:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'gtwantennas_gtwd7.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 76.76.XXX.XXX ) in drupal_is_denied() (line 1895 of /home/gtwantennas/www/d7test/includes/bootstrap.inc).
foxmarks’s picture

FWIW, I was getting this error attempting an upgrade from D6.24 to D7.14
My site uses .htaccess to redirect its URL to the Drupal install in a subfolder. I copied all the files (including settings.php) into a new D7 subfolder.

In the first attempt at upgrading, Drupal recognized the previous install. When I clicked the “update” link, I got the WSOD. I then pointed my URL back to the D6 install and it was still functioning correctly. When I re-pointed back to the D7 subfolder I got this “1146 Table blocked.ips” error.

I recopied the D6 settings.php into the D7 install, and Drupal recognized the previous install again. This time, the “update” link worked. The upgrade has completed successfully.

I don’t know why…

babbage’s picture

@foxmarks, and almost certainly some others who will pass by here: you will get this error if you have a settings.php file that has already been updated to the Drupal 7 format, and try and run the upgrade process on a Drupal 6 database with the Drupal 7 codebase. The most likely scenario for this is if you are trying to upgrade to Drupal 7, encounter an issue that prevents it from successfully completing, roll back your database to the original Drupal 6 backup, but forget to roll back your settings.php file to Drupal 6.

In such circumstances, restoring the old settings.php file will fix the problem, and in my experience it is likely in many cases that you can just delete the new block of code at the end of the settings.php file that the upgrade has inserted, and this will achieve the same result.

Hope this saves someone some exasperated hair pulling. :)

drzraf’s picture

can reproduce,
a (far from acceptable) workaround is commenting-out the "blocked_ip" conf directive present in stock D7 settings.default.php

hermes_costell’s picture

@babbage:
GREAT TIP! Thanks very much - this was my issue. I was upgrading / downgrading / upgrading again, trying to figure out some migration issues and hadn't carefully wiped out the newly created settings.php file.

kumarprince’s picture

Version: 7.12 » 7.22

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ppp.blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 127.0.0.1 ) in drupal_is_denied() (line 1909 of C:\Users\GovGuru\Desktop\Working\subteampartners\includes\bootstrap.inc).

I am getting this error, Its been a week and I am unable to fix it. I have gone through the entire post but didn't find any solution. I am using Acquia Dev Desktop software

Andrew Schulman’s picture

In MySQL, you can create the missing table by submitting the following SQL against your D7 database:

CREATE TABLE `blocked_ips` (
  `iid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key: unique ID for IP addresses.',
  `ip` varchar(40) NOT NULL DEFAULT '' COMMENT 'IP address',
  PRIMARY KEY (`iid`),
  KEY `blocked_ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores blocked IP addresses.' AUTO_INCREMENT=1 ;

After that the upgrade should continue normally.

Celine Bessa’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: -Needs manual testing
Celine Bessa’s picture

drupal_upgrade.patch queued for re-testing.

kenorb’s picture

I had similar problem, but the problem was in Deploy module which was disabled and was trying to bootstrap core by it-self.
See: #2128231: Deploy breaks Drupal 6 to 7 upgrade when using drush
(backtrace available)

kenorb’s picture

(removed)

kenorb’s picture

Issue summary: View changes
Status: Needs review » Postponed (maintainer needs more info)

More backtraces are needed.

dgtlmoon’s picture

(maintainer needs more info) ? It's clearly happening to a lot of people, the backtrace would be simply that the table is missing

Mutedhorn’s picture

I am having the same issue, but it appears to be bigger problem than just blocked_ips table not being there. I imported from a D7 database still produced errors. It seems to a larger issue with the update.php failing. Tried from the update several times incase the files themselves didn't transfer correctly but it keeps producing the blocked_ips error. Or after a blocked_ips table has been imported it produces: Fatal error: Class 'SelectQueryExtender' not found in /nfs/c08/h03/mnt/153362/domains/gc.robohobo.net/html/includes/tablesort.inc on line 15

Please advise. All my other drupal upgrades have worked without a hitch but this one has me banging my head on the desk. Thanks!

clemens.tolboom’s picture

Just a note: This blog post suggests a work around http://www.thedavidmeister.info/post/quick-tip-workaround-table-blockedi...

I haven't tested this but hope this helps people to update the summary.

Why is the issue version set to 7.22 ?

colan’s picture

Version: 7.22 » 7.x-dev

This should probably be tracking HEAD.

whoislorenzo’s picture

Version: 7.x-dev » 7.31
Assigned: Unassigned » whoislorenzo
Issue tags: +database bootstrap

I'm having this same issue. What is the fix? O

Andrew Schulman’s picture

As far as I can tell, there is no fix yet. I tried all of the workarounds described here, with inconsistent results. At no time was I able to finish the upgrade. I finally gave up and rebuilt my D7 site from scratch. More work, but at least it gives you a reliable path to a solution.

colan’s picture

Version: 7.31 » 7.x-dev
Assigned: whoislorenzo » Unassigned

@whoislorenzo: Please don't change the version as this needs to be fixed in dev first, and don't assign it to yourself unless you plan on providing a patch which fixes the issue.

The last submitted patch, 3: 0001-blocked_ips-exception-not-caught.patch, failed testing.

Status: Postponed (maintainer needs more info) » Needs work

The last submitted patch, 5: 0001-blocked_ips-exception-not-caught.patch, failed testing.

cilefen’s picture

+1 for this issue. I remember having it on a few sites I upgraded last year.

cilefen’s picture

I saw exactly what was in #41.

For me, creating the table, something like what was shown in #59 fixed the issue. We should consider dropping this issue to major from critical because there is a workaround.

cilefen’s picture

Priority: Critical » Major

I am dropping this to Major because there is a workaround that I personally used many times.

roynilanjan’s picture

Underlying problem in the includes/bootstrap.inc line 2178. As in that line this is assumed
that PDO has loaded the database.inc but during this phase of bootstrapping still
the system_update_7000(); yet to execute(which is basically responsible to create the blocked_ips table),
hence the break happens during up-gradation.
So rather to patch in update.php(as suggested in #5), this'll be more efficient if we can provide a kind of solution as

  if (class_exists($class_name) && db_table_exists('blocked_ips')) {
    // As same query to blocked_ips table;
  } 

although this need to be tested more & let advise on this solution then I can provide it as patch.
Please remember this will be from D-7.5, probably for that reason line number from bootstrap.inc is not matching
from above comments

roynilanjan’s picture

Status: Needs work » Needs review