diff --git a/.gitignore b/.gitignore
index f98caa0f31463538507330f8a3d81d8f4fe015ed..8b4ef879fe071ebf6d961710f8105af93dd3e99c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,7 +8,8 @@ nav
 app/inc/config.php
 vendor
 cache/
-tpl_c/
+tpl_c/*
+!tpl_c/.gitkeep
 .php_cs.cache
 .zanata-cache/
 
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index de1245830e80b10ed807ad3a15c939e5c1afe29e..a9f0eb2099d4a6d38a42672ae798b69cc51030dd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,6 @@ test:
   stage: test
   script:
     - composer install -o  --no-interaction --no-progress --prefer-dist
-    - mkdir tpl_c
     - php vendor/bin/php-cs-fixer fix --verbose --dry-run
     - APP_ENV=test bin/doctrine migrations:migrate --no-interaction -vvv
     - vendor/bin/phpunit --bootstrap app/tests/bootstrap.php --debug app/tests
@@ -40,10 +39,10 @@ pages:
   - git checkout ${latesttag}
   - composer install -o  --no-interaction --no-progress --prefer-dist --no-dev
   - composer dump-autoload --optimize --no-dev --classmap-authoritative
-  - mkdir tpl_c
   - mkdir framadate
   - mv `ls -A | grep -v framadate` ./framadate
-  - chmod -R 644 framadate/ && chmod -R 770 framadate/tpl_c/ && chmod -R 770 framadate/app/inc/
+  - find framadate/ -type d -exec chmod 750 {} \;
+  - find framadate/ -type f -exec chmod 640 {} \;
   - zip -r latest.zip framadate
   - mkdir .public
   - cp latest.zip .public
@@ -65,7 +64,6 @@ beta:
   - composer dump-autoload --optimize --no-dev --classmap-authoritative
 #   - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini; fi
 #   - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make pull-locales; fi
-  - mkdir tpl_c
   - mkdir .public
   - cp -r * .public
   - cp -r .git .public
diff --git a/admin/install.php b/admin/install.php
index 2876120d388f433899ccb397ea5869f20eb28d19..ee9edd363c52bfa06dd55b1a2ff36827592fc80a 100644
--- a/admin/install.php
+++ b/admin/install.php
@@ -37,11 +37,13 @@ if (!empty($_POST)) {
     if ($result['status'] === 'OK') {
         header(('Location: ' . Utils::get_server_name() . 'admin/migration.php'));
         exit;
-    }  
-        $error = __('Error', $result['code']);
+    }
+
+    $error = __('Error', $result['code']);
 }
 
 $smarty->assign('error', $error);
+$smarty->assign('error_details', $result['details']);
 $smarty->assign('title', __('Admin', 'Installation'));
 $smarty->assign('fields', $installService->getFields());
-$smarty->display('admin/install.tpl');
\ No newline at end of file
+$smarty->display('admin/install.tpl');
diff --git a/app/classes/Framadate/Services/InstallService.php b/app/classes/Framadate/Services/InstallService.php
index ad7963de520c7818151f2ae5f5748348756f6a0a..45a5cab708a4b228214341fe2f591850a52707ab 100644
--- a/app/classes/Framadate/Services/InstallService.php
+++ b/app/classes/Framadate/Services/InstallService.php
@@ -60,9 +60,10 @@ class InstallService {
         }
 
         // Connect to database
-        $connect = $this->connectTo($this->fields);
-        if (!$connect) {
-            return $this->error('CANT_CONNECT_TO_DATABASE');
+        try {
+            $connect = $this->connectTo($this->fields);
+        } catch(\Doctrine\DBAL\DBALException $e) {
+            return $this->error('CANT_CONNECT_TO_DATABASE', $e->getMessage());
         }
 
         // Write configuration to conf.php file
@@ -87,13 +88,7 @@ class InstallService {
             'driver' => $fields['dbDriver'],
             'charset' => $fields['dbDriver'] === 'pdo_mysql' ? 'utf8mb4' : 'utf8',
         ];
-        try {
-            return DriverManager::getConnection($connectionParams, $doctrineConfig);
-        } catch (DBALException $e) {
-            $logger = new LogService();
-            $logger->log('ERROR', $e->getMessage());
-            return null;
-        }
+        return DriverManager::getConnection($connectionParams, $doctrineConfig);
     }
 
     function writeConfiguration(Smarty &$smarty) {
@@ -128,10 +123,11 @@ class InstallService {
      * @param $msg
      * @return array
      */
-    function error($msg) {
+    function error($msg, $details = '') {
         return [
             'status' => 'ERROR',
-            'code' => $msg
+            'code' => $msg,
+            'details' => $details,
         ];
     }
 
diff --git a/php.ini b/php.ini
index bde5cfc8f8cf5b4fa5ece9747c07317f443c3c2c..844099af97bdd6b784100c2c4390c19d30ef1485 100644
--- a/php.ini
+++ b/php.ini
@@ -4,7 +4,7 @@ log_errors = On
 error_log = /var/log/apache2/error.log
 ignore_repeated_errors = On
 register_globals = Off
-
+session.cookie_httponly = 1
 
 [Date]
 date.timezone = "Europe/Paris"
diff --git a/tpl/admin/install.tpl b/tpl/admin/install.tpl
index d585bce60b8c16a6764bda342def9b53d9d8bbd1..aa6416c477139ac3e42c524b4128859218ea6c4a 100644
--- a/tpl/admin/install.tpl
+++ b/tpl/admin/install.tpl
@@ -6,7 +6,10 @@
         <form action="" method="POST">
 
             {if $error}
-                <div id="result" class="alert alert-danger">{$error}</div>
+                <div id="result" class="alert alert-danger">
+                    <h4>{$error}</h4>
+                    <small>{$error_details}</small>
+                </div>
             {/if}
 
             <fieldset>
diff --git a/tpl_c/.gitkeep b/tpl_c/.gitkeep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391