1

I'm encountering a very weird problem where my database settings look like this in database.inc:openConnection()

array(1) {
  ["default"]=>
  array(6) {
    ["driver"]=>
    string(1) "A"
    ["database"]=>
    string(1) "A"
    ["username"]=>
    string(1) "A"
    ["password"]=>
    string(1) "A"
    ["host"]=>
    string(1) "A"
    ["port"]=>
    string(1) "A"
  }
}

It's after I moved the site to a new host with Ubuntu 14.04, so PHP and MySQL are now on a different version.

Another related strange thing is that drush sql-connect is not returning anything.

The result of global $databases; var_dump($databases); looks normal.

1 Answer 1

0

Silly me. I copied some lines from D6 settings.php. After adding an extra ['default'] here: $databases['default']['default'] = array(... things are working fine again.


Note 1: Probably good to not delete this question as someone else might run into something similar at some point.

Note 2: Will be nice if Drupal 8+ will have a more informative way of error reporting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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