-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathconfig.dist.php
More file actions
158 lines (153 loc) · 8.37 KB
/
Copy pathconfig.dist.php
File metadata and controls
158 lines (153 loc) · 8.37 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
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
<?php // @formatter:off
/**
* This file is part of the phpCacheAdmin.
* Copyright (c) Róbert Kelčák (https://kelcak.com/)
*/
declare(strict_types=1);
/*
* Do not edit this file but copy it to config.php.
*/
return [
/**
* Enabled dashboards and their order. The first item is the default dashboard.
*/
'dashboards' => [
RobiNN\Pca\Dashboards\Server\ServerDashboard::class,
RobiNN\Pca\Dashboards\Redis\RedisDashboard::class,
RobiNN\Pca\Dashboards\Memcached\MemcachedDashboard::class,
RobiNN\Pca\Dashboards\OPCache\OPCacheDashboard::class,
RobiNN\Pca\Dashboards\APCu\APCuDashboard::class,
RobiNN\Pca\Dashboards\Realpath\RealpathDashboard::class,
],
'redisoptions' => [
//'client' => 'predis', // redis or predis. Auto-detected when not set.
//'blockedcommands' => ['CONFIG SET', 'CONFIG REWRITE', 'REPLICAOF', 'SLAVEOF', 'MIGRATE', 'RESTORE', 'SAVE'], // Extra commands to refuse in the console.
'pubsubrefresh' => 5, // In seconds, refresh interval for the Pub/Sub active channels list - default 5
'pubsubwindow' => 5, // In seconds, how long one Pub/Sub monitor request captures messages (1-10) - default 5
'scanthreshold' => 100_000, // Use SCAN automatically instead of KEYS when the database has more keys than this, 1000 keys are retrieved - default 100_000
//'scansize' => 1000, // Always use SCAN and retrieve at most this many keys, regardless of 'scanthreshold' (optional).
],
'redis' => [
[
'name' => 'Localhost', // The server name (optional).
'host' => '127.0.0.1', // Optional when a path or nodes is specified.
/*'nodes' => [
// List of cluster nodes.
'127.0.0.1:7000',
'127.0.0.1:7001',
'127.0.0.1:7002',
],*/
'port' => 6379, // Optional when the default port is used.
/*'sentinels' => [
// List of Sentinels. The current master is looked up on every request, so failover is picked up on the next page load.
'127.0.0.1:26379',
'127.0.0.1:26380',
'127.0.0.1:26381',
],*/
//'sentinelmaster' => 'mymaster', // Name of the monitored master (optional). Default mymaster.
//'sentinelpassword' => '', // Password of the Sentinels themselves, not of the master (optional).
//'scheme' => 'tls', // Connection scheme (optional).
/*'ssl' => [
// SSL options for TLS https://www.php.net/manual/en/context.ssl.php - requires Redis >= 6.0 (optional).
'cafile' => 'private.pem',
'verify_peer' => true,
],*/
//'database' => 0, // Default database (optional).
//'username' => '', // ACL - requires Redis >= 6.0 (optional).
//'password' => '', // Optional.
//'authfile' => '/run/secrets/file_name', // File with a password, e.g., Docker secrets (optional).
//'path' => '/var/run/redis/redis-server.sock', // Unix domain socket (optional).
//'databases' => 16, // Number of databases, use this if the CONFIG command is disabled (optional).
//'separator' => ':', // Separator for tree view (optional).
],
],
'memcachedoptions' => [
//'blockedcommands' => ['flush_all', 'stats reset'], // Extra commands to refuse in the console, the case does not matter.
],
'memcached' => [
[
'name' => 'Localhost', // The server name, optional.
'host' => '127.0.0.1', // Optional when a path is specified.
'port' => 11211, // Optional when the default port is used.
//'path' => '/var/run/memcached/memcached.sock', // Unix domain socket (optional).
//'separator' => ':', // Separator for tree view (optional).
//'extension' => true, // Enable Memcached extension only for get and set operations (optional).
],
],
'apcu' => [
'separator' => ':', // Separator for tree view (optional).
],
'opcache' => [
//'warmuppaths' => ['/var/www'], // Directories the warmup may compile from. Defaults to the document root.
],
// Access
//'readonly' => true, // Block all destructive actions (deleting, editing, consoles, ...) - default false.
'console' => true, // Remove the consoles - default true.
'authusers' => [
// Auth is enabled when at least one user is defined. Passwords can be `password_hash()` hashes.
//'admin' => 'your-password',
],
// Security
//'authtoken' => '', // Token for the metrics cronjob, only used when auth is enabled. Generate a long random one, e.g. `php -r "echo bin2hex(random_bytes(32));"`.
'securityheaders' => true, // Send CSP, X-Frame-Options, X-Content-Type-Options and Referrer-Policy - default true.
// Decoding / Encoding functions
'converters' => [
'gzcompress' => [
'view' => static fn (string $value): ?string => @gzuncompress($value) !== false ? gzuncompress($value) : null,
'save' => static fn (string $value): string => gzcompress($value),
],
'gzencode' => [
'view' => static fn (string $value): ?string => @gzdecode($value) !== false ? gzdecode($value) : null,
'save' => static fn (string $value): string => gzencode($value),
],
'gzdeflate' => [
'view' => static fn (string $value): ?string => @gzinflate($value) !== false ? gzinflate($value) : null,
'save' => static fn (string $value): string => gzdeflate($value),
],
'zlib' => [
'view' => static fn (string $value): ?string => @zlib_decode($value) !== false ? zlib_decode($value) : null,
'save' => static fn (string $value): string => zlib_encode($value, ZLIB_ENCODING_DEFLATE),
],
/*'gz_magento' => [
'view' => static function (string $value): ?string {
$prefix = ':gz:';
$value = str_starts_with($value, $prefix) ? substr($value, strlen($prefix)) : $value;
return @gzuncompress($value) !== false ? gzuncompress($value) : null;
},
'save' => static fn (string $value): string => ':gz:'.gzcompress($value),
],*/
],
// Formatting functions, it runs after decoding
'formatters' => [
'unserialize' => static function (string $value): ?string {
$unserialized_value = @unserialize($value, ['allowed_classes' => false]);
if ($unserialized_value !== false && is_array($unserialized_value)) {
try {
return json_encode($unserialized_value, JSON_THROW_ON_ERROR);
} catch (JsonException) {
return null;
}
}
return null;
},
],
// Customizations
//'timezone' => 'Europe/Bratislava', // Leave empty (or commented out) to get it automatically obtained.
'timeformat' => 'd. m. Y H:i:s',
'decimalsep' => ',',
'thousandssep' => ' ',
'listview' => 'table', // table/tree - default key list view
'keymodal' => false, // Open the key view in a modal instead of a separate page - default false
'sortthreshold' => 100_000, // Above this many keys a column sort only orders the page on screen, sorting them all would need too much memory. 0 disables the limit - default 100_000
'panelrefresh' => 30, // In seconds, refresh interval for panels - default 30
'metricsrefresh' => 60, // In seconds, refresh interval for metrics - default 60
'metricstab' => '1d', // Default tab in metrics, 1h - Last hour, 1d - Last day, 1w - Last week, 1m - Last month - default 1d
'liverefresh' => 2, // In seconds, sampling interval for the live mode toggle in metrics (1-60) - default 2
'metricsmaxage' => 30, // In days, how long the collected metrics are kept. 0 keeps everything - default 30
'hash' => 'pca', // Any random string to secure a metrics DB file.
'tmpdir' => __DIR__.'/tmp', // Directory for temporary files.
'metricsdir' => __DIR__.'/tmp/metrics', // Directory for metrics DB files.
'twigcache' => __DIR__.'/tmp/twig', // Directory for Twig cache files.
//'pcapath' => 'vendor/robinn/phpcacheadmin/', // Path to the package when installed via composer. Used for assets.
//'url' => '/', // URL to the dashboard when installed via composer, e.g., /phpcacheadmin
];