Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By iam_serg on
Hi there, I have a error when I try to install drupal 7.28. I am using xampp. I had not encountered this error when using drupal 7.27. The error code is below.
DatabaseConnectionNotDefinedException: The specified database connection is not defined: default in Database::openConnection() (line 1678 of Y:\xampp\htdocs\sunriserealty-web\includes\database\database.inc).
Please help. Thanks
Comments
Look in your settings.php -
Look in your settings.php - have you defined the database settings there?
Database unavailable
Hello Sergio,
This error usually comes when the specified Database is not found by the server.
If you closely look at the error you come to notice that the DB not found. Here is the code where it comes
So what i can suggest is to cross check your DB name, hostname and the password. It will be in your settings.php.
Path for settings.php root_folder\sites\default\settings.php
Path for error code (optional) root_folder\includes\database\database.inc.
Please feel free to contact if i can help you more.
Regards
Tarun Nagpal
Problem on Install
Sorry for the wait...was a bit busy. Drupal did install correctly.
But now I'm getting the same error with Drupal 7.31.
When i go to install drupal this is what happens, same as before:
1) Select an installation profile: Standard or Minimal. I choose Standard.
2) Choose language. I choose English.
From there, I don't get the page where I input my database info and password.
it just goes to the following error.
DatabaseConnectionNotDefinedException: The specified database connection is not defined: default in Database::openConnection() (line 1678 of Y:\xampp\htdocs\testsite-d7\includes\database\database.inc).
The website encountered an unexpected error. Please try again later.
Drupal is skipping a page. Not sure why?
Drupal Install Skipping Database Info Page
This problem is caused because on installing drupal, the installation is skipping the page where you input the information for the database. I can't get around that. I'm having the same problem when installing drupal commerce kickstart 2.
I can install drupal via drush, but this time around I was installing kickstart 2.
Would appreciate the help. thanks,
I ran into this issue when
I ran into this issue when using a custom profile. In my case the problem was, that I added a dependency to xautoload module in the
.info file. The __xautoload_register_drupal() function, wich is called when requiering the module, tries to registers Drupal-related namespaces - this will cause an uncatched exception.
After disableing the xautoload module it works as expected...