I have a site I built for someone over a year ago and I recently needed to make changes on it. I can see the site before I log in but as soon as I log in there is an internal server error. I was trying to copy the site to a local server so I can try upgrading to the most recent drupal version but when I try to access the site locally there is a different error:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drp_bcl553hd1m.semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of E:\drupal1\includes\lock.inc).
I believe this is a database issue or a problem with my settings.php but I am not really sure. I also tried adding the semaphore in to the table which just introduced a boostrap error.
These problems don't make sense because I haven't made changes to the site since it was previously working and no one else makes changes.
I would be very grateful for any help. Thank You.
Comments
Drupal Version
I probably should have mentioned that this is version 7.9
Your post is hard to
Reimport the site to the local server (preferably following the migration documentation). Clear caches. If you are struggling to get the migration to a local server using the suck-it-and-see method, try following the documentation http://drupal.org/node/776864. If you still have the problem, check that the table is present and that the database name is the same.
To diagnose the server error on login, look at the Drupal latest log entries (if you cannot log in, you can read them with drush) and / or look at the server error log. Normally this is available even on shared hosting.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Thank You
I was able to get access using drush after the whole night of messing around, but your advice helped. Although my site seems very glitchy now. When I tried reimporting from the fixed local copy to the server I kept having issues with update.php giving a register_globals must be off error. I tried changing it in .htaccess and also tried adding a php.ini that turned it off. Every time I made this change I would just get a server denied error on my site.
All that aside, thanks again for your help.
Running a test or dev site on
Running a test or dev site on a different environment than the live server is often a problem. There are some tools for getting the local environment the same as the production server, the best known being Puppet http://funnymonkey.com/vagrant-puppet-drupal-development (there is also a presentation you can watch on Vagrant & Puppet from DrupalCon Portland). I just stick a dev site on the same server as the production site and work remotely, and you could still do it on shared hosting I imagine (though I would not run a Drupal site on generic shared hosting, so I steer low-budget clients towards Wordpress).
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
very useful information.
very useful information. thank you for sharing it.
thanks
packersm