aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf.php2
-rw-r--r--conf.private.example.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/conf.php b/conf.php
index 837016c..e8ed000 100644
--- a/conf.php
+++ b/conf.php
@@ -47,7 +47,7 @@ set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__));
require_once('./conf.private.php');
try {
- $_pdo = new PDO("mysql:host=$db_host;port=$db_port;dbname=$db_name;charset=utf8", $db_user, $db_pass);
+ $_pdo = new PDO("mysql:host=".DB_HOST.";port=".DB_PORT.";dbname=".DB_NAME.";charset=utf8", DB_USER, DB_PASS);
$_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die("Down until PDO error fixed.");
diff --git a/conf.private.example.php b/conf.private.example.php
index 90b4c51..54f4133 100644
--- a/conf.private.example.php
+++ b/conf.private.example.php
@@ -1,10 +1,10 @@
<?php
// Database settings (should be mysql)
-$db_host = 'localhost';
-$db_name = 'my_database';
-$db_user = 'my_database_user';
-$db_pass = 'my_password';
-$db_port = '3306';
+define('DB_HOST', 'localhost');
+define('DB_NAME', 'my_database');
+define('DB_USER', 'my_database_user');
+define('DB_PASS', 'my_password');
+define('DB_PORT', '3306');
// Braintree settings
define('BRAINTREE_ENABLED', true);