diff --git a/.travis.yml b/.travis.yml index b5abb787..2bf2fde7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,9 @@ after_failure: - sudo cat /etc/nginx/sites-enabled/default - sudo cat /var/log/nginx/error.log - sudo cat /var/log/php5-fpm.log - - sudo cat /var/log/*mysql* + - sudo ls /var/run/mysql* + - sudo ls /var/log/*mysql* + - sudo cat /var/log/mysql # configure notifications (email, IRC, campfire etc) #notifications: diff --git a/core/util.inc.php b/core/util.inc.php index d8a589f5..c64d95d3 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -600,7 +600,7 @@ $_execs = 0; */ function _count_execs($db, $sql, $inputarray) { global $_execs; - if ((defined(DEBUG_SQL) && DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) { + if (defined(DEBUG_SQL) && (DEBUG_SQL === true || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) { $fp = @fopen("data/sql.log", "a"); if($fp) { if(isset($inputarray) && is_array($inputarray)) { diff --git a/install.php b/install.php index 4e0bd779..3f11c2ba 100644 --- a/install.php +++ b/install.php @@ -123,10 +123,12 @@ function do_install() { // {{{ } else if(@$_POST["database_type"] == "sqlite" && isset($_POST["database_name"])) { define('DATABASE_DSN', "sqlite:{$_POST["database_name"]}"); + define("DATABASE_KA", true); // Keep database connection alive install_process(); } else if(isset($_POST['database_type']) && isset($_POST['database_host']) && isset($_POST['database_user']) && isset($_POST['database_name'])) { define('DATABASE_DSN', "{$_POST['database_type']}:user={$_POST['database_user']};password={$_POST['database_password']};host={$_POST['database_host']};dbname={$_POST['database_name']}"); + define("DATABASE_KA", true); // Keep database connection alive install_process(); } else { diff --git a/tests/test_install.php b/tests/test_install.php index 9184d109..a547bd64 100644 --- a/tests/test_install.php +++ b/tests/test_install.php @@ -51,7 +51,9 @@ class ShimmieInstallerTest extends WebTestCase { } elseif ($db === "pgsql") { $this->setField("database_user", "postgres"); $this->setField("database_password", ""); - } + } else { + die("Unsupported Database Option"); + } $this->assertField("database_name", "shimmie"); $this->clickSubmit("Go!");