Wednesday, December 29, 2010

Drupal warning: table Semaphore doesn't exist.

If you recently upgraded your Drupal installation you might have landed at this error. I was working on the website Relationship-talks.com and I stumbled on this error. I tried to solve it at my own but it was a dirty work to see exactly where that table was missing. A lot of searching on internet finally revealed the working solution. The reason as specified by the error message is that the table Semaphore is missing.

Solution: Create the table
Since the problem is due to the table not being found, the solution is to create the table and move on. That is what I did and everything was fine. I do not want to pretend like a smart ass to tell you how to create a table, but lest you are a newbie to website business and/or this is your first attempt with Drupal, I do not want Drupal to leave a bad taste in your mouth.

Most probably your hosting service will have the phpmyadmin installed. All you have to access phpmyadmin and select your database. Then click on the sql tab and paste the following query:

CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) ) /*!40100 DEFAULT CHARACTER SET UTF8 */

Click on go and try your Drupal installation now. You should be fine. Hope this will help someone.

2 comments:

  1. That worked like a charm but now when preforming the update - i am getting a message:

    Drupal database update

    The update process was aborted prematurely while running update #6049 in system.module. All errors have been logged. You may need to check the watchdog database table manually.

    ReplyDelete
  2. I was trying to fix that error for few hours. Thank you very much for your solution that cleared my error.

    ReplyDelete