Fix the Drupal cross core upgrade session handler error

Home » Content Management Systems » Fix the Drupal cross core upgrade session handler error
August 8, 2016 Content Management Systems, Drupal No Comments

When attempting to do a cross core upgrade from Drupal 6.x to Drupal 7.x one could find himself experiencing the following error which prevents the upgrade from completing:

Uncaught exception thrown in session handler.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ssid' in 'where clause': SELECT 1 AS expression FROM {sessions} sessions WHERE ( (sid = :db_condition_placeholder_0) AND (ssid = :db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0] => 890315603f946e052fde7afc528b052e [:db_condition_placeholder_1] => ) in _drupal_session_write() (line 209 of /home/xxxxxxx/public_html/includes/session.inc).

The error in question occurs because the “ssid” column (usually missing in Drupal 6.x) does not exist within the “sessions” table and can be corrected easily by executing the following MySQL query via your phpMyAdmin:

ALTER TABLE sessions ADD ssid VARCHAR(128);

This will create the “ssid” column in the “sessions” table and will resolve this upgrade roadblock.

NOTE: Table names may vary depending on the table prefix used, if any.

LEAVE A COMMENT