forked from opendcim/openDCIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.inc.php-dist
38 lines (31 loc) · 908 Bytes
/
db.inc.php-dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
$dbhost = 'localhost';
$dbname = 'dcim';
$dbuser = 'dcim';
$dbpass = 'dcim';
$locale = "en_US";
$codeset = "UTF-8";
$pdo_options=array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'
);
try{
$pdoconnect="mysql:host=$dbhost;dbname=$dbname";
$dbh=new PDO($pdoconnect,$dbuser,$dbpass,$pdo_options);
}catch(PDOException $e){
printf( "Error! %s\n", $e->getMessage() );
die();
}
if ( !defined( "AUTHENTICATION") ) {
define( "AUTHENTICATION", "Apache" );
}
/* If you want to use Oauth authentication, comment the above 3 lines, uncomment the next 4 lines
and place your authentication handler in login.php (create symbolic link).
ex. cp oauth/login_with_google.php oauth/login.php
*/
// define( "AUTHENTICATION", "Oauth" );
// if ( php_sapi_name() != "cli" ) {
// session_start();
// }
require_once( 'config.inc.php');
$config=new Config();
?>