-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathbref.ini
44 lines (36 loc) · 1.86 KB
/
bref.ini
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
; On the CLI we want errors to be sent to stdout -> those will end up in CloudWatch
display_errors=1
; Since PHP 7.4 the default value is E_ALL
; We override it to set the recommended configuration value for production.
; See https://github.com/php/php-src/blob/d91abf76e01a3c39424e8192ad049f473f900936/php.ini-production#L463
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
memory_limit=10240M
opcache.enable=1
opcache.enable_cli=1
; Store the opcodes into a file cache instead of memory
; Since PHP runs on lambdas with a new process each time the memory cache is lost
; TODO store in a subdirectory (but the problem is that the subdirectory doesn't exist when PHP starts...)
opcache.file_cache="/tmp"
; Disable the memory cache since it's useless
; In my tests it allows to gain 30% of response time in a classic API controller
opcache.file_cache_only=1
; Skip this check to save a bit
opcache.validate_permission=0
; The code is readonly on lambdas so it never changes
; This setting is now disabled: code could be written to /tmp which is read/write
; (e.g. a compiled container) Such a performance optimization can be done by users.
;opcache.validate_timestamps=0
; Set sane values, modern PHP applications have higher needs than opcache's defaults
; See https://tideways.com/profiler/blog/fine-tune-your-opcache-configuration-to-avoid-caching-suprises
opcache.memory_consumption=128
opcache.max_accelerated_files=10000
; This directive determines which super global arrays are registered when PHP
; starts up. G,P,C,E & S are abbreviations for the following respective super
; globals: GET, POST, COOKIE, ENV and SERVER.
; We explicitly populate all variables else ENV is not populated by default.
; See https://github.com/brefphp/bref/pull/291
variables_order="EGPCS"
extension_dir=/opt/bref/extensions
; Extensions enabled by default
extension=pdo_mysql.so
zend_extension=opcache.so