Context 1)


Hi!

I have a problem during a clean drupal installation with domain. Current installation workflow is made with phing.

If I put


<?php
include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';
?>

at the end of my settings.php before module installation i get an error because

blocked_ips

table does not exist.

If I remove this include, I get the error

Fatal error: Call to undefined function _domain_bootstrap_modules() in /sites/all/modules/domain/domain.module on line 1467

obviously.

How I can proceed with installation?
Only solution are the installation of module after the Drupal installation?


Context 2)

We are experiencing problems with drush command to import a sql-dump on a site that has an active "domain" module installed. Because of the code in the installation step, in sites/default/settings.php:

<?php
include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';
?>

Drush attempts to bootstrap and run queries against the database. In the scenario the database exists but the table is missing, a PDOException is thrown. ie:

drush sql-cli < ./sql_dump.sql

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[42000] [1049] Unknown database &#039;mydomain_database&#039; in drupal_is_denied() (line 1915 of /var/www/vhosts/mydomain.com/includes/bootstrap.inc).

Additional

PDOException: SQLSTATE[42000] [1049] Unknown database &#039;mydomain_database&#039; in system_list() (line 165 of /var/www/vhosts/mydomain.com/includes/module.inc).


Drush command terminated abnormally due to an unrecoverable error. [error]

Comments

agentrickard’s picture

Yes, generally you would install the module after the site install.

That's how my install script runs.

bzitzow’s picture

+1

We also are experiencing problems with our backing up and migrating scripts that are used to copy a drupal site to a developers local development box.

When importing a sqldump:
drush sql-cli < ./mydomain.`date +"%Y-%m-%d"`.sql

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[42000] [1049] Unknown database &#039;mydomain_database&#039; in drupal_is_denied() (line 1915 of /var/www/vhosts/mydomain.com/includes/bootstrap.inc).

Additional

PDOException: SQLSTATE[42000] [1049] Unknown database &#039;mydomain_database&#039; in system_list() (line 165 of /var/www/vhosts/mydomain.com/includes/module.inc).


Drush command terminated abnormally due to an unrecoverable error. [error]

generally installing the module after the site install is the advice given, I'm specifically trying to import a sql database.

Shall I create a new issue?

bzitzow’s picture

Assigned: Unassigned » bzitzow
Issue summary: View changes
Issue tags: -installation +Issue needs confirmation
StatusFileSize
new1.06 KB

If PDOException is thrown during bootstrapping within the context of a drush command
Then assume it is a sql import
And then display a warning, with the message
And then continue execution
Instead of exiting due to fatal error.

@vincenzodb - does this patch resolve your error, too?

bzitzow’s picture

Title: Problems during drush-site-install » Problems during drush-site-install & drush sql-cli < dump.sql
bzitzow’s picture

Status: Active » Needs review
agentrickard’s picture

Status: Needs review » Needs work

Code is malformed. Please see the coding standards.

agentrickard’s picture

The use of ECHO output is unacceptable, and the problem still seems to be that you have edited settings.php prematurely.

I also don't quite understand the use-case here. The issue is that you're trying to dump and insert a sql db from an existing Drupal install to a non-existant one?

FreekVR’s picture

Should be closed as duplicate I think? See https://drupal.org/node/1941336

FreekVR’s picture

bluegeek9’s picture

Status: Needs work » Closed (outdated)
Issue tags: -

Drupal 7 in End of Life and no longer supported. We encourage you to upgrade to a supported version of Drupal. For more information, see https://www.drupal.org/upgrade.

//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support of this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project, including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.