forked from drlippman/IMathAS
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig_dev.php
More file actions
88 lines (62 loc) · 2.21 KB
/
config_dev.php
File metadata and controls
88 lines (62 loc) · 2.21 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
//IMathAS Math Config File. Adjust settings here!
//database access settings
$dbserver = getenv("DB_SERVER");
$dbname = getenv("DB_NAME");
$dbusername = getenv("DB_USER");
$dbpassword = getenv("DB_PASSWORD");
//error reporting level. Set to 0 for production servers.
error_reporting(E_ALL & ~E_NOTICE);
//install name
$installname = "IMathAS";
//login prompts
$loginprompt = "Username";
$longloginprompt = "Enter a username. Use only numbers, letters, or the _ character.";
$loginformat = '/^[\w+\-]+$/';
//require email confirmation of new users?
$emailconfirmation = false;
//email to send notices from
$sendfrom = "imathas@yoursite.edu";
//color shift icons as deadline approaches?
$colorshift = true;
//path settings
//web path to install
$imasroot = "";
//base site url - use when generating full URLs to site pages.
$httpmode = 'https://';
$GLOBALS['basesiteurl'] = $httpmode . Sanitize::domainNameWithPort($_SERVER['HTTP_HOST']) . $imasroot;
//mimetex path
$mathimgurl = "http://www.imathas.com/cgi-bin/mimetex.cgi";
//enable lti?
$enablebasiclti = true;
//allow nongroup libs?
$allownongrouplibs = false;
//allow course import of questions?
$allowcourseimport = false;
//allow macro install?
$allowmacroinstall = true;
//use more secure password hashes? requires PHP 5.3.7+
$CFG['GEN']['newpasswords'] = 'only';
//session path
//$sessionpath = "";
//Amazon S3 access for file upload
//$AWSkey = "";
//$AWSsecret = "";
//$AWSbucket = "";
//Uncomment to change the default course theme, also used on the home & admin page:
//$defaultcoursetheme = "default.css"
//To change loginpage based on domain/url/etc, define $loginpage here
//no need to change anything from here on
/* Connecting, selecting database */
try {
$DBH = new PDO("mysql:host=$dbserver;dbname=$dbname", $dbusername, $dbpassword);
$DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );
$GLOBALS["DBH"] = $DBH;
} catch(PDOException $e) {
die("<p>Could not connect to database: <b>" . $e->getMessage() . "</b></p></div></body></html>");
}
$DBH->query("set session sql_mode=''");
unset($dbserver);
unset($dbusername);
unset($dbpassword);
?>