-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redis/scripts/setup-drupal-settings.sh creates settings.php incorrectly if it is not alreay present #20
Comments
So you created a project with no code in it, then did a Please give a step-by-step way to create this problem with a new project. I know that a PR would be very welcome. I'm not 100% sure that one could count on the default.settings.php if the settings.php is not there. |
@rfay Sure, my apologies! Our setup is probably a little bit of an edge case given how we use ddev.
Step 5 returns an error that it couldn't connect to the database. Step 3 is what actually broke the system though by created a non-php settings.php file. I will be happy to submit a PR once I remember how to do so in github. Been too long! |
Okay, this appears to be more edge case than I thought. I just tried to recreate this scenario using the ddev cms quickstart instructions as a base. Only I ran the composer I will investigate further. |
We encourage people not to use php or composer on the host at all because of different behaviors based on php and composer version. So we'd encourage you to use And... I think with that setup you'd already have a settings.php always. Could you try it again using the recommended flow? |
Ran into an issue today setting up a ddev environment for drupal with redis. If the ddev get ddev/ddev-redis command is issued before the ddev start command the setup-drupal-settings.sh file ends up creating a settings.php file with only its configuration in there. The ddev start command then appends the standard settings.ddev.php stuff in there as well. However, the drupal site will fail to install because the settings.php file created by the redis script was done so without copying the default.settings.php or even adding in the php open tag, so drupal fails to install as it cannot find a valid database connection string since the settings.php without the opening php tags won't properly load in settings.ddev php.
Proposed fix would be to adjust the script to check for the existence of settings.php and if it does not exist then create it by copying default.settings.php before appending the redis settings to the file.
The text was updated successfully, but these errors were encountered: