This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.php
67 lines (54 loc) · 2.47 KB
/
config.php
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
<?php
use lib\ConfigHelper;
use lib\LogHelper;
/*
* THIS IS THE CONFIG FILE FOR
*
* A. INSTALLATION SETTINGS
* B. DEVELOPMENT SETTINGS
*/
/****************************************************************
A. INSTALLATION SETTINGS
****************************************************************/
// BASE URL =================================
// Project URL Config. example: http://openmedis.davidhuser.ch/api
ConfigHelper::write('path', 'http://openmedis-prod.davidhuser.ch/api');
// DATABASE =================================
// MySQLi DB Config
ConfigHelper::write('db.host', 'localhost');
// database root name (in ehealthbox it is openmedis)
ConfigHelper::write('db.basename', '');
ConfigHelper::write('db.user', '');
ConfigHelper::write('db.password', '');
// LOGGING =================================
// enable logging on whole server. Log file under directory /log/log.log.
// it logs e.g. who logged in, who deleted assets, error messages, ...
ConfigHelper::write('log', TRUE);
// how long the logging should be kept on the server before the file gets deleted.
// e.g. 168 => 168/24 = 7 days.
ConfigHelper::write('log.hours', 168);
// DEBUG MODE =================================
// enable debug mode on whole server. See slim docs.
ConfigHelper::write('debug', TRUE);
// COMPRESSION =================================
// determine if serverside compression library zlib for gzip is enabled. Otherwise data usage can get large!
if (extension_loaded("zlib")) {
ob_start("ob_gzhandler");
} else {
$message = 'No zlib extension for HTTP compression installed on server.
Please contact webhoster to install the zlib extension.
PHPinfo can be found under www.example.com/api/info.php';
echo $message;
LogHelper::write($message);
}
/****************************************************************
B. DEVELOPMENT SETTINGS
****************************************************************/
// MOBILE SCOPE FOR MYSQL DB TABLES ==================
// relevant tables in mobile scope
$tables = array('assets', 'location', 'facilities', 'contacttype', 'contact', 'donors', 'agents', 'suppliers',
'manufactures', 'consumables', 'consumables_linked', 'employees', 'stock', 'department',
'essential_equipment', 'assetgenericname', 'assetutilization', 'assetstatus', 'assetcategory', 'intervention',
'request', 'request_st', 'warrantycontract', 'intervention_material', 'intervention_work', 'visit_type',
'failurcateg', 'failurecause');
ConfigHelper::write('db.mysql_tables', $tables);