Skip to content

Commit

Permalink
Modify config-db.php include to check for file instead of doing a (fa…
Browse files Browse the repository at this point in the history
…iled) include and spamming the log files that the file doesn't exist
  • Loading branch information
Cam34 committed Jun 14, 2015
1 parent f2713f1 commit 829d896
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ykksm-config.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php
//ykksm will use the configuration stored in /etc/yubico/ksm/config-db.php, if that file exists. If it does not exist, the below values will be used.

if(!include '/etc/yubico/ksm/config-db.php') {
if(file_exists('/etc/yubico/ksm/config-db.php')) {
include '/etc/yubico/ksm/config-db.php';
} else {
$dbuser='ykksmreader';
$dbpass='yourpassword';
$basepath='';
@@ -10,7 +12,6 @@
$dbport='';
$dbtype='mysql';
}

$db_dsn = "$dbtype:dbname=$dbname;host=127.0.0.1";
$db_username = $dbuser;
$db_password = $dbpass;

0 comments on commit 829d896

Please sign in to comment.