Skip to content
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

Using PHP_TAG=7.4-dev-4.27.1 tag causes Drupal not to route to the site anymore. #85

Open
kevinquillen opened this issue Sep 24, 2021 · 6 comments

Comments

@kevinquillen
Copy link

I updated from 7.4-4.19 to the latest tag in the 7.4 line, and when I did that I could no longer run drush cr or access the website. It appeared that the appropriate site folder was no longer read and that settings files were not locatable. Dropping back to the old tag resolved the issue for me.

@csandanov
Copy link
Member

What's your Drupal version? Most likely the image comes with the updated global drush that no longer supports your Drupal version. You should have your own drush coming with your drupal composer setup (see drupal-composer or drupal/recommened-project).

@kevinquillen
Copy link
Author

kevinquillen commented Sep 29, 2021

Drupal 9.2.4. I am and have been including drush/drush in composer, it is at version 10.

Drush aside, the homepage displays:

Notice: Undefined offset: 1 in Drupal\Core\Database\Database::parseConnectionInfo() (line 215 of /var/www/html/web/core/lib/Drupal/Core/Database/Database.php).
Drupal\Core\Database\Database::parseConnectionInfo(Array) (Line: 263)
Drupal\Core\Database\Database::addConnectionInfo('default', 'default', Array) (Line: 165)
Drupal\Core\Site\Settings::initialize('/var/www/html/web', 'sites/nber.docker.localhost', Object) (Line: 1073)
Drupal\Core\DrupalKernel->initializeSettings(Object) (Line: 707)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Undefined index: driver in Drupal\Core\Database\Database::parseConnectionInfo() (line 234 of /var/www/html/web/core/lib/Drupal/Core/Database/Database.php).
Drupal\Core\Database\Database::parseConnectionInfo(Array) (Line: 263)
Drupal\Core\Database\Database::addConnectionInfo('default', 'default', Array) (Line: 165)
Drupal\Core\Site\Settings::initialize('/var/www/html/web', 'sites/nber.docker.localhost', Object) (Line: 1073)
Drupal\Core\DrupalKernel->initializeSettings(Object) (Line: 707)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Notice: Undefined index: driver in Drupal\Core\Database\Database::openConnection() (line 374 of /var/www/html/web/core/lib/Drupal/Core/Database/Database.php).
Drupal\Core\Database\Database::openConnection('default', 'default') (Line: 169)
Drupal\Core\Database\Database::getConnection('default')
call_user_func_array('Drupal\Core\Database\Database::getConnection', Array) (Line: 79)
Drupal\Component\DependencyInjection\PhpArrayContainer->createService(Array, 'database') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('database', 1) (Line: 212)
Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters(Array) (Line: 62)
Drupal\Component\DependencyInjection\PhpArrayContainer->createService(Array, 'cache.container') (Line: 176)
Drupal\Component\DependencyInjection\Container->get('cache.container') (Line: 550)
Drupal\Core\DrupalKernel->getCachedContainerDefinition() (Line: 903)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 473)
Drupal\Core\DrupalKernel->boot() (Line: 716)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DriverNotSpecifiedException: Driver not specified for this database connection: default in Drupal\Core\Database\Database::openConnection() (line 375 of /var/www/html/web/core/lib/Drupal/Core/Database/Database.php).
Drupal\Core\Database\Database::openConnection() (Line: 169)
Drupal\Core\Database\Database::getConnection()
call_user_func_array() (Line: 79)
Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (Line: 176)
Drupal\Component\DependencyInjection\Container->get() (Line: 212)
Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters() (Line: 62)
Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (Line: 176)
Drupal\Component\DependencyInjection\Container->get() (Line: 550)
Drupal\Core\DrupalKernel->getCachedContainerDefinition() (Line: 903)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 473)
Drupal\Core\DrupalKernel->boot() (Line: 716)
Drupal\Core\DrupalKernel->handle() (Line: 19)

The $_ENV is empty if I dump it in settings.php.

@kevinquillen kevinquillen changed the title Using latest PHP tag for 7.4 causes Drupal not to route to the site anymore. Using PHP_TAG=7.4-dev-4.27.1 tag causes Drupal not to route to the site anymore. Sep 29, 2021
@kevinquillen
Copy link
Author

Update, the tag I am using is actually PHP_TAG=7.4-dev-4.27.1

@kevinquillen
Copy link
Author

Perhaps I missed this change - but $_ENV no longer has those values but $_SERVER does. Changing to $_SERVER works, but the docs appear to state to hard code the credentials into settings.php instead?

@kevinquillen
Copy link
Author

This also failed for me elsewhere: $_ENV['HOME']

@csandanov
Copy link
Member

the behaviour regarding the global env vars most likely changed because of wodby/php#145

as for drush most likely the issue in your settings.php file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants