summaryrefslogtreecommitdiff
path: root/static/includes
diff options
context:
space:
mode:
Diffstat (limited to 'static/includes')
-rw-r--r--static/includes/database.inc.php6
-rw-r--r--static/includes/settings.inc.php19
2 files changed, 25 insertions, 0 deletions
diff --git a/static/includes/database.inc.php b/static/includes/database.inc.php
new file mode 100644
index 0000000..2ed0274
--- /dev/null
+++ b/static/includes/database.inc.php
@@ -0,0 +1,6 @@
+<?php
+include_once 'settings.inc.php';
+
+/* NOTE: we don't have to unref the PDO because we're not long-running */
+$db = new PDO(POMF_DB_CONN, POMF_DB_USER, POMF_DB_PASS);
+?>
diff --git a/static/includes/settings.inc.php b/static/includes/settings.inc.php
new file mode 100644
index 0000000..8a7fc7b
--- /dev/null
+++ b/static/includes/settings.inc.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * PDO Connection data
+ */
+// PDO socket
+define('POMF_DB_CONN', 'mysql:host=localhost;dbname=pomf');
+// PDO user
+define('POMF_DB_USER', 'pomf');
+// PDO password
+define('POMF_DB_PASS', '***');
+
+/**
+ * File stuff
+ */
+// Root location of files
+define('POMF_FILES_ROOT', '/mnt/disk1/pomf/files/');
+// How many times to retry when exists() before giving up
+define('POMF_FILES_RETRIES', 5);
+?>