public function dbSanityAction() { // Leave if not ready if (empty($this->_session->mysql)) { return $this->_helper->redirector->gotoRoute(array('action' => 'db-info')); } // Connect try { $config = $this->dbFormToConfig($this->_session->mysql); $adapter = Zend_Db::factory($config['adapter'], $config['params']); $adapter->getServerVersion(); } catch (Exception $e) { $this->view->error = 'Adapter Error: ' . $e->getMessage(); if (APPLICATION_ENV == 'development') { echo $e; } return; } // Run sanity $this->view->test = $test = new Engine_Sanity(array('tests' => array(array('type' => 'MysqlServer', 'name' => 'MySQL 4.1', 'adapter' => $adapter, 'minVersion' => '4.1'), array('type' => 'MysqlEngine', 'name' => 'MySQL InnoDB Storage Engine', 'adapter' => $adapter, 'engine' => 'innodb')))); $test->run(); $this->view->maxErrorLevel = $maxErrorLevel = $test->getMaxErrorLevel(); $this->_session->db_sanity = array('maxErrorLevel' => $maxErrorLevel); }