1

I have been sent site files and a database for a website to review but have had trouble loading it up. The core and contributed modules are all D7, but when I import the database and run a page on the browser I get a message,

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'example.semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of example.com/includes/lock.inc).

I suspect this means that the database I have been given is a D6 one, but need to confirm this. Is the version declared anywhere, or is the absence of the semaphore the evidence I need?

4

In Drupal 6 the node revisions are in {node_revisions}, and in Drupal 7 the node revisions are in {node_revision}. So, you can just check which table exists. There are some structural differences with the tables, too. For example there is a status column in D7, but not in D6.

  • Thanks, that confirmed it. They sent me mismatched code and database. – Ashlar Apr 23 '12 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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