1

I have imported an outdated production Drupal 6.9 site to my development machine. Then, I upgraded all modules to 6.24. After a while, I imported the database of the production site (to have new nodes). The site appears to work properly on the front end. But now it does not update neither form drush, nor by calling update.php from browser. At drush I get:

    An error occurred at function : drush_pm_post_pm_update            [error]
    WD php: Table 'mysitedb.semaphore' doesn't exist              [error]
    query: DELETE FROM main_semaphore WHERE value =
    '31092233150575fa189b4d9.09364052' in /path/to/mysite/includes/lock.inc
    on line 224.

On Google Chrome, I get just a "Server error" page.

Update: I created semaphore table using this answer but it did not resolve the problem.

0

2 Answers 2

3

From main_ one would think you have a prefix set up on your production site or the development site and perhaps not or werent at the time of upgrade. It's quite confusing what you see, but one thing for sure: compare prefix settings and check MySQL for SHOW TABLES LIKE '%semaphore%' and go from there.

1
  • 4
    I had 'prefix' => 'main_', in my settings.php database configuration, simply because I had copy/pasted the example db configuration from the example in settings.php (line 116 in D7.23). In my case, my db tables had no prefixes, so removing main_ fixed it for me: 'prefix' => '',
    – mcaleaa
    Commented Jun 30, 2014 at 8:59
2

If you have multiple databases in D7 you might need to create a semaphore table in you own DBs:

CREATE TABLE IF NOT EXISTS semaphore ( name varchar(255) NOT NULL DEFAULT '', value varchar(255) NOT NULL DEFAULT '', expire double NOT NULL, PRIMARY KEY (name), KEY expire (expire) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.