From 849e40d2343c32cf9b04e5b4fef2ab000f72e464 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Tue, 9 Jan 2018 23:17:06 -0600 Subject: [PATCH] Some logging around the DB detection #132 --- modules/Installer/Services/EnvironmentService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/Installer/Services/EnvironmentService.php b/modules/Installer/Services/EnvironmentService.php index be546b1b..b232e116 100644 --- a/modules/Installer/Services/EnvironmentService.php +++ b/modules/Installer/Services/EnvironmentService.php @@ -60,11 +60,13 @@ class EnvironmentService $conn = new PDO($dsn, $opts['DB_USER'], $opts['DB_PASS']); $version = strtolower($conn->getAttribute(PDO::ATTR_SERVER_VERSION)); + Log::info('Detected DB Version: '.$version); # If it's mariadb, enable the emulation for prepared statements # seems to be throwing a problem on 000webhost # https://github.com/nabeelio/phpvms/issues/132 if(strpos($version, 'mariadb') !== false) { + Log::info('Detected MariaDB, setting DB_EMULATE_PREPARES to true'); $opts['DB_EMULATE_PREPARES'] = true; }