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 'mydomain_database' in drupal_is_denied() (line 1915 of /var/www/vhosts/mydomain.com/includes/bootstrap.inc).
Additional
PDOException: SQLSTATE[42000] [1049] Unknown database 'mydomain_database' in system_list() (line 165 of /var/www/vhosts/mydomain.com/includes/module.inc).
Drush command terminated abnormally due to an unrecoverable error. [error]
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | domain-problems_during_drush_site_install-2175947-3.patch | 1.06 KB | bzitzow |
Comments
Comment #1
agentrickardYes, generally you would install the module after the site install.
That's how my install script runs.
Comment #2
bzitzow commented+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"`.sqlgenerally 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?
Comment #3
bzitzow commentedIf 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?
Comment #4
bzitzow commentedComment #5
bzitzow commentedComment #6
agentrickardCode is malformed. Please see the coding standards.
Comment #7
agentrickardThe 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?
Comment #8
FreekVR commentedShould be closed as duplicate I think? See https://drupal.org/node/1941336
Comment #9
FreekVR commentedComment #10
bluegeek9 commentedDrupal 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.