Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
install system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2009 at 13:09 UTC
Updated:
25 Sep 2010 at 17:04 UTC
I can't install D7 HEAD on MAMP, PHP 5.2.5
When I submit the database connection settings page, PHP dies with the following trace:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal_7.variable' doesn't exist' in /Users/sime/Repos/drupal-cvs/core/drupal-7/includes/database/database.inc:1734
Stack trace:
#0 /Users/sime/Repos/drupal-cvs/core/drupal-7/includes/database/database.inc(1734): PDOStatement->execute(Array)
#1 /Users/sime/Repos/drupal-cvs/core/drupal-7/includes/database/database.inc(567): DatabaseStatementBase->execute(Array, Array)
#2 /Users/sime/Repos/drupal-cvs/core/drupal-7/includes/database/database.inc(1822): DatabaseConnection->query('SELECT value FR...', Array, Array)
#3 /Users/sime/Repos/drupal-cvs/core/drupal-7/install.php(759): db_query('SELECT value FR...', 'install_task')
#4 /Users/sime/Repos/drupal-cvs/core/drupal-7/install.php(993): install_verify_completed_task()
#5 /Users/sime/Repos/drupal-cvs/core/drupal-7/includes/form.inc(878): install_settings_form_submit(Array, Array)
#6 /Users/sime/Repos/drupal-cvs/core/drupal-7/includes/form.inc(536): form_execut in /Users/sime/Repos/drupal-cvs/core/drupal-7/includes/database/database.inc on line 1734
This is occuring when install_verify_completed_task() tries to query the variable table before the table exists. Clearly, according to the comments in the code, this is supposed to be a caught exception, but is uncaught - I have failed to work out what the cause is, I haven't worked with the try/catch construct before maybe this is something simple.
The code for convenience...
function install_verify_completed_task() {
try {
if ($result = db_query("SELECT value FROM {variable} WHERE name = '%s'", 'install_task')) {
$task = unserialize(db_result($result));
}
}
// Do not trigger an error if the database query fails, since the database
// might not be set up yet.
catch (Exception $e) {
}
...
Comments
Comment #1
simeOh, I verified that tables can be created ok in the database. It's creating and deleting the table "drupal_install_test" fine.
Comment #2
simeWith fresh checkout:
This is the line that throws the exception, if I read my code right.
Comment #3
simeThis is a bug with eaccellerator in MAMP. I successfully switched to APC.
Comment #5
restyler commentedOh, I coudln't install Drupal 7 , with same error. Thank you! I've disabled eAccelerator0951_5.2.4.dll and managed to install D7 after that (winXP).
Was this problem fixed in new eAcc? Is it possible to rewrite piece of D7 code causing this problem?
Comment #6
marcvangendIf this a problem with MAMP/eaccellerator, then that is where it should be fixed. Closing again.
Comment #7
David_Rothstein commentedNote: Continuing discussion of eAccellerator issues at #914742: Add hook_requirements() for buggy versions of eAccelerator.
It is likely this is not something Drupal can work around, but we should take the time to determine that definitively as it seems to be a popular configuration, and a nasty bug.