Drupal 8 website keeps redirecting to /core/install.php with error, with an error: Fatal error: Cannot redeclare _drupal_shutdown_function_handle_exception() (previously declared in... (the following instances):

.../html/web/core/includes/bootstrap.inc

and another instance in

.../html/vendor/drupal/core/includes/bootstrap.inc

For some reason, it seemed to be a problem caused during the installation using composer, or a mix-up in the use of composer to install the D8 website. It seems the presence of core in the vendor directory is forcing the install redirect. To fix this:

  1. deleted the core directory (sub-folder) inside /html/vendor/drupal/
    Drupal 8 composer core folder directory
  2. in Drush, run the composer update command, which will now detect a missing composer.json at core, and will use the one provided at the /html/ web root location
  3. The same composer update command, will now clean-up the vendor directory and regenerate all necessary Drupal core files and fix the issue
  4. In Drush, run drush cache:rebuild to clear all cache. If an error appears related to some contrib module, just do the same cache rebuild again

     

 

Leave a Comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
16 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Get reliable web hosting services

Recurring donation

Make Donation

  • Other: $

Donate now

Single donation

Make Donation

  • Other: $

Donate now