Category: Drupal
Solution SMTP: PHPMailer Library Missing, PHPMailer is Required for SMTP to function.
Solution SMTP: PHPMailer Library Missing PHPMailer is Required for SMTP to function.
Step 1 add to composer.json on section require:
"require": {
....
"phpmailer/phpmailer": "^6.5"
},
Step from our main folder of the project – using CMD:
..> composer update
Solution for Drupal 8, The website encountered an unexpected error. Please try again later.
Solution for Drupal 8, The website encountered an unexpected error. Please try again later.
The website stoped working and also the admin section.
1- Change the configuration to display more information the error, on the configuration file:
/sites/default/settings.php and add:
$config['system.logging']['error_level'] = 'verbose';
2- After if you update your browser you see more information about the error – on our case: The issue was the connection to the database
The website encountered an unexpected error. Please try again later.
PDOException: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
in Drupal\Component\DependencyInjection\PhpArrayContainer->createService()
(line 79 of C:\xampp\htdocs\e-smartsolutionCMS\core\lib\Drupal\Component\DependencyInjection\PhpArrayContainer.php).
Drupal\Component\DependencyInjection\PhpArrayContainer->createService(Array, 'database') (Line: 173)
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: 173)
Drupal\Component\DependencyInjection\Container->get('cache.container') (Line: 544)
Drupal\Core\DrupalKernel->getCachedContainerDefinition() (Line: 910)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 477)
Drupal\Core\DrupalKernel->boot() (Line: 707)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)