Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293219

Unable to pre-populate db in settings.php

$
0
0

If you prepopulate the database settings in settings.php, the install process gives several errors.

Example of pre-populated DB settings (created by simply copying default.settings.php to settings.php and appending this code):

$databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'd8dev',
  'username' => 'vagrant',
  'password' => '',
  'host' => 'localhost',
  'collation' => 'utf8_general_ci',
);

The install process initially reaches step 3 (Database configuration) and correctly populates the form fields with the values that were added to settings.php. Clicking 'Save and continue' returns the user to the same page, but with the values removed. If you then re-enter the values and click 'Save and continue' again, the user is returned to the start of the installation process. This time around, when the user reaches the 'Install profile' page, 4 errors are displayed:

  • Notice: Undefined index: databases in drupal_rewrite_settings() (line 188 of core/includes/install.inc).
  • No active batch.
  • Notice: Use of undefined constant USERNAME_MAX_LENGTH - assumed 'USERNAME_MAX_LENGTH' in _install_configure_form() (line 2241 of core/includes/install.core.inc).
  • Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'user_form_process_password_confirm' not found or invalid function name in form_builder() (line 1864 of core/includes/form.inc).

Attached PDF shows screenshots of this process.

AttachmentSizeStatusTest resultOperations
d8-cant-prepopulate-db-in-settings_php.pdf549.72 KBIgnored: Check issue status.NoneNone

Viewing all articles
Browse latest Browse all 293219

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>