1
0
Fork 0
This commit is contained in:
Airikr 2024-06-09 18:13:46 +02:00
parent 2432ccdcf1
commit 29d1538d68

View file

@ -28,6 +28,11 @@
if(file_exists('vendor/autoload.php')) {
require_once 'vendor/autoload.php';
$Parsedown = new Parsedown();
if(!file_exists($dir_files.'/encryption.key')) {
$enckey = KeyFactory::generateEncryptionKey();
KeyFactory::save($enckey, $dir_files.'/encryption.key');
}
}
require_once 'site-functions.php';
@ -35,7 +40,7 @@
if(!empty($database_host) AND !empty($database_name) AND !empty($database_user) AND !empty($database_pass)) {
if(!empty($database_host) AND !empty($database_port) AND !empty($database_name) AND !empty($database_user) AND !empty($database_pass)) {
try {
$sql = new PDO('pgsql:host='.$database_host.';port='.$database_port.';dbname='.$database_name.';user='.$database_user.';password='.$database_pass);
$sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);