-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
97 lines (77 loc) · 3.19 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
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
<?php
// Application
define('DOMAIN', 'http://localhost/PHPluse/');
define('DIR', 'PHPluse');
define('ROOT', __DIR__);
define('DS', DIRECTORY_SEPARATOR);
define('LANGUAGE', 'en');
// Set the database configurations
define ('DB_DRIVER', 'mysql');
define ('DB_HOST', 'localhost');
define ('DB_NAME', 'app');
define ('DB_USER', 'root');
define ('DB_PASSWORD', '');
define ('DB_PORT', 3306);
define ('DB_CHARSET', 'utf8');
define ('DB_SSLMODE', 'disable');
define ('DB_SQLITE', 'storage/sqlite/restful.db');
// Set sessions options
define('SESS_NAME', 'sess');
define('SESS_DOMAIN', '');
define('SESS_LIFE_TIME', 2678400);
define('SESS_DOMAIN_PATH', '/');
define('SESS_SSL', false);
define('SESS_HTTP', true);
define('SESS_SAVE_PATH', ROOT.DS.'storage'.DS.'sessions');
define('SESS_REGENERATE', false);
/** [ Errors ] **/
ini_set ('display_errors', 1);
error_reporting (E_ALL);
/** [ Time zone ] **/
ini_set ('date.timezone', 'Africa/Cairo');
date_default_timezone_set ('Africa/Cairo');
/** [ Charset ] **/
ini_set ('default_charset', 'UTF-8');
/** [ Memory limit ] **/
ini_set ('memory_limit', '500M');
/** [ File Upload ] **/
ini_set('upload_max_filesize', '500M');
ini_set('post_max_size', '500M');
/** [ URL include ] **/
ini_set ('allow_url_include', 0);
/** [ Sessions ] **/
// Allow access to the session ID cookie only when the protocol is HTTPS
// If a website is only accessible via HTTPS, it should enable this setting
ini_set ('session.cookie_secure', 0);
// Specifies whether the module will use cookies to store the session id on the client
// Most applications should use a cookie for the session ID
ini_set ('session.use_cookies', 1);
// Only use cookies to store the session id on the client side
// Enabling this setting prevents attacks involved passing session ids in URLs
ini_set ('session.use_only_cookies', 1);
// Enabling session.use_strict_mode is mandatory for secure sessions
// This prevents the session module to use an uninitialized session ID
// The session module only accepts valid session IDs generated by the session module
ini_set ('session.use_strict_mode', 1);
// Disabling transparent session ID management improves the general session ID security
// by eliminating the possibility of a session ID injection and/or leak
ini_set ('session.use_trans_sid', 0);
// Refuses access to the session cookie from JavaScript
// This setting prevents cookies snatched by a JavaScript injection
ini_set ('session.cookie_httponly', 1);
// Specifies the lifetime of the cookie in seconds which is sent to the browser
// The value 0 means "until the browser is closed
ini_set ('session.cookie_lifetime', 2678400);
// Defines the name of the handler which is used for storing and retrieving session data
// Defaults to files
ini_set ('session.save_handler', "files");
/** [ Xdebug ] **/
ini_set ('xdebug.collect_vars', 'on');
ini_set ('xdebug.collect_params', '4');
ini_set ('xdebug.dump_globals', 'on');
ini_set ('xdebug.dump.SERVER', 'REQUEST_URI');
ini_set ('xdebug.show_local_vars', 'on');
// Limits the maximum execution time, The default limit is 30 seconds
// If set to zero, no time limit is imposed
set_time_limit (0);
?>