Skip to content

Commit

Permalink
Use mysqli in db_url for Drupal 6, fixes ddev#1372 (ddev#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Dec 14, 2018
1 parent 650ac56 commit 4b9d035
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/ddevapp/drupal.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ if (version_compare($version, "7.0") > 0) {
);
} else {
// or the old db_url format for d6
$db_url = 'mysql://db:db@{{ $config.DatabaseHost }}:{{ $config.DatabasePort }}/db';
$db_url = 'mysqli://db:db@{{ $config.DatabaseHost }}:{{ $config.DatabasePort }}/db';
}
`

Expand Down Expand Up @@ -366,6 +366,8 @@ func createDrupal6SettingsFile(app *DdevApp) (string, error) {
// Currently there isn't any customization done for the drupal config, but
// we may want to do some kind of customization in the future.
drupalConfig := NewDrupalSettings()
// mysqli is required in latest D6LTS and works fine in ddev in old D6
drupalConfig.DatabaseDriver = "mysqli"

if err := manageDrupalSettingsFile(app, drupalConfig, drupal6SettingsTemplate, drupal6SettingsAppendTemplate); err != nil {
return "", err
Expand Down

0 comments on commit 4b9d035

Please sign in to comment.