/**
  * Database configuration post action
  */
 public function configurePostAction()
 {
     $error = FALSE;
     $data = array();
     try {
         if ($this->getRequest()->isPost()) {
             $data = $this->getRequest()->getPost();
             Fox::getModel('installer/session')->setConfiguration($data);
             $hostName = $data['db_host'];
             $dbName = $data['db_name'];
             $userName = $data['db_username'];
             $password = $data['db_password'];
             $dbAdapter = Zend_Db::factory('Pdo_Mysql', array('host' => $hostName, 'username' => $userName, 'password' => $password, 'dbname' => $dbName));
             if (!$dbAdapter->getConnection()) {
                 throw new Exception('Databse connection failed');
             }
             Zend_Db_Table_Abstract::setDefaultAdapter($dbAdapter);
             Uni_Fox::setDatabaseAdapter($dbAdapter);
             Uni_Core_Installer::runInstaller();
             $this->sendRedirect('*/wizard/administrator');
             return;
         }
     } catch (Exception $e) {
         Fox::getHelper('core/message')->setError($e->getMessage());
     }
     $this->sendRedirect('*/wizard/configure', array('locale' => urlencode(Fox::getModel('installer/session')->getLocale()), 'timezone' => urlencode(Fox::getModel('installer/session')->getTimezone())));
 }