diff --git a/module/VuFind/src/VuFind/Controller/InstallController.php b/module/VuFind/src/VuFind/Controller/InstallController.php index a40e0e4c06e4ab9a3a2230470aeecef89079d73e..70fd24b770188affac868e9e0b9193dd99319346 100644 --- a/module/VuFind/src/VuFind/Controller/InstallController.php +++ b/module/VuFind/src/VuFind/Controller/InstallController.php @@ -321,9 +321,19 @@ class InstallController extends AbstractBase $connection = 'mysql://' . $view->dbrootuser . ':' . $this->params()->fromPost('dbrootpass') . '@' . $view->dbhost; - $db = AdapterFactory::getAdapterFromConnectionString( - $connection . '/mysql' - ); + try { + $db = AdapterFactory::getAdapterFromConnectionString( + $connection . '/mysql' + ); + } catch (\Exception $e) { + $this->flashMessenger()->setNamespace('error') + ->addMessage( + 'Problem initializing database adapter; ' + . 'check for missing Mysqli library. Details: ' + . $e->getMessage() + ); + return $view; + } try { // Get SQL together $query = 'CREATE DATABASE ' . $view->dbname;