Skip to content

Commit

Permalink
Some logging around the DB detection #132
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio committed Jan 10, 2018
1 parent 7e71b46 commit 849e40d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/Installer/Services/EnvironmentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ protected function determinePdoOptions($opts)

$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;
}

Expand Down

0 comments on commit 849e40d

Please sign in to comment.