Search code examples
drupalddev

I set up a Drupal project in ddev and I get a PDOException when hitting the project URL


I see this when going to my project I just set up in ddev: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.semaphore' doesn't exist: and Uncaught exception thrown in shutdown function.


Solution

  • Answer:

    • Hit the /install.php URL to install (like http://mysite.ddev.local/install.php) or

    • Import a database with ddev import-db

    The problem here is that most Drupal versions assume that if a settings.php is configured and a db exists (and ddev does that on config), that it will have something useful in it, so it doesn't redirect by default to /install.php.