forked from partkeepr/PartKeepr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php.template
190 lines (157 loc) · 6.59 KB
/
config.php.template
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?php
namespace PartKeepr;
use PartKeepr\Util\Configuration;
/**
* Specifies the username for the database
*/
Configuration::setOption("partkeepr.database.username", "partkeepr");
/**
* Specifies the password for the database
*/
Configuration::setOption("partkeepr.database.password", "partkeepr");
/**
* Specifies the hostname for the database
*/
Configuration::setOption("partkeepr.database.host", "localhost");
/**
* Specifies the database name
*/
Configuration::setOption("partkeepr.database.dbname", "partkeepr");
/**
* Specifies the database port.
* Doesn't need to be specified. "null" specifies the default port.
*/
Configuration::setOption("partkeepr.database.port", null);
/**
* Specifies the MySQL unix socket to use
*/
Configuration::setOption("partkeepr.database.mysql_socket", null);
/**
* Specifies the database driver.
*
* In general, we support any database platform also supported by DBAL. For details, see
* http://www.doctrine-project.org/docs/dbal/2.0/en/reference/configuration.html#driver
*
* Available drivers:
* pdo_mysql MySQL is preferred, as all development happens on that platform.
* pdo_pgsql PostgreSQL should perform well, but could give problems here and there. Be sure to report these bugs!
* pdo_sqlite SQLite driver; mostly untested
* pdo_oci PDO-based Oracle driver; mostly untested. Seems to give problems; try oci8 instead
* pdo_sqlsrv MSSQL driver; mostly untested
* oci8 A driver which uses the PHP oci8 extension
*
* WARNING: Some database drivers require configuration options, which we don't support yet. We currently
* only push the parameters "username", "password", "hostname" and "dbname" into DBAL's configuration. We need to rework
* this; until then, at least pdo_sqlite won't work.
*/
Configuration::setOption("partkeepr.database.driver", "pdo_mysql");
/**
* Specifies a message of the day (MOTD) to display on login. Simply replace false with any string.
*/
Configuration::setOption("partkeepr.frontend.motd", false);
/***********************************************************************************************************************
* CONFIGURATION SETTINGS FOR MIGRATING FROM PARTDB TO PARTKEEPR. LEAVE UNTOUCHED IF YOU DON'T HAVE PARTDB TO MIGRATE
**********************************************************************************************************************/
Configuration::setOption("partkeepr.migration.partdb.hostname", "localhost");
Configuration::setOption("partkeepr.migration.partdb.username", "partdb");
Configuration::setOption("partkeepr.migration.partdb.password", "partdb");
Configuration::setOption("partkeepr.migration.partdb.dbname", "partdb");
/***********************************************************************************************************************
* END OF THE GENERAL CONFIGURATION SECTION - BELOW ARE CONFIGURATION SETTINGS WHICH USUALLY DON'T NEED TO BE ADJUSTED
**********************************************************************************************************************/
/**
* Specifies if doctrine should log the SQL queries by echoing them. If you enable this, all AJAX service calls from the
* frontend will fail because the resulting output isn't JSON anymore.
*/
Configuration::setOption("partkeepr.database.echo_sql_log", false);
/**
* Specifies the location of the uploaded files
*/
Configuration::setOption("partkeepr.files.path", __DIR__."/data/files/");
/**
* Specifies the location of the uploaded images
*/
Configuration::setOption("partkeepr.images.path", __DIR__."/data/images/");
/**
* Specifies the cache dir
*/
Configuration::setOption("partkeepr.images.cache", Configuration::getOption("partkeepr.images.path")."cache/");
/**
* Specifies if auto login is wanted or not
*/
Configuration::setOption("partkeepr.frontend.autologin.enabled", false);
/**
* Specifies the auto login username
*/
Configuration::setOption("partkeepr.frontend.autologin.username", null);
/**
* Specifies the auto login password
*/
Configuration::setOption("partkeepr.frontend.autologin.password", null);
/**
* Specifies if frontend debugging should be turned on. This will create a non-minified, single JS file
* out of all source files
*/
Configuration::setOption("partkeepr.frontend.debug", false);
/**
* Specifies if the frontend should load each single JS file individually, in contrast to merging all JS files
* into partkeepr-debug.js.
*/
Configuration::setOption("partkeepr.frontend.debug_all", false);
/**
* Specifies if cronjobs should be checked. Disable this on Windows unless we have an automatic cronjob runner
* emulation implemented.
*/
Configuration::setOption("partkeepr.cronjobs.disablecheck", false);
/**
* Specifies if password changing is allowed.
*/
Configuration::setOption("partkeepr.frontend.allow_password_change", true);
/**
* Specifies the separator for category paths. If you change this, you need to rebuild the category paths by
* executing the script scripts/UpdateCategoryPathCache.php
*/
Configuration::setOption("partkeepr.category.path_separator", " ➤ ");
/**
* Set to true if authentication via HTTP is wanted.
*
* Authentication is then completely handled by your web server. Non-existant users are created automatically.
* Make sure you have admin rights transferred prior switching to HTTP auth.
*
* As soon as you set HTTP auth, you can no longer login and logout in PartKeepr, as this is handled by your web server.
*/
Configuration::setOption("partkeepr.auth.http", false);
/**
* Set to true if logging is wanted.
*
* If you leave as-is or set to false, no log will be written at all. If you set this to true, a log will be written
* to the file specified by partkeepr.logger.outputfile. You need to make sure that the path to the file exists and
* that the file is writable.
*/
Configuration::setOption("partkeepr.logger.enable", false);
/**
* Specifies the log file for the logger. If you enable logging and specify no outputfile, the default will be
* /tmp/partkeepr.log.
*
* You need to make sure that the path to the file exists and that the file is writable.
*/
Configuration::setOption("partkeepr.logger.outputfile", "/tmp/partkeepr.log");
/**
* Specifies the cache implementation. You can choose from one of these:
*
* - none
* - APC
* - MemCache
* - XCache
*
* Please note that you need additional options for memcache.
*/
Configuration::setOption("partkeepr.cache.implementation", "APC");
/**
* Specifies the memcache hostname. Defaults to localhost
*/
Configuration::setOption("partkeepr.cache.memcache.host", "localhost");
/**
* Specifies the memcache port. Defaults to 11211
*/
Configuration::setOption("partkeepr.cache.memcache.port", "11211");