-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathphp.ini.recommended
More file actions
68 lines (58 loc) · 1.89 KB
/
php.ini.recommended
File metadata and controls
68 lines (58 loc) · 1.89 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
; PHP.ini Recommended Configuration for Biblioteca Application
; Production Performance Optimizations
; Copy relevant settings to your php.ini or .user.ini file
; ===================================
; OPCODE CACHE (OPcache) - CRITICAL
; ===================================
; OpCache stores precompiled script bytecode in memory
; Eliminates the need to load and parse PHP files on every request
; Expected performance improvement: +30-50% for PHP applications
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=128
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.revalidate_freq=2
opcache.fast_shutdown=1
; In production, set to 0 for maximum performance
; In development, set to 1 to see changes immediately
opcache.validate_timestamps=1
; ===================================
; MEMORY & PERFORMANCE
; ===================================
memory_limit=256M
max_execution_time=60
max_input_time=60
post_max_size=100M
upload_max_filesize=100M
; Per caricare audiobook fino a 500 MB, aumentare entrambi i valori a 512M
; e impostare max_execution_time=300 e max_input_time=300
; ===================================
; SESSION CONFIGURATION
; ===================================
session.cookie_httponly=1
session.cookie_samesite="Strict"
session.use_strict_mode=1
session.cookie_secure=0 ; Set to 1 in production with HTTPS
; ===================================
; ERROR HANDLING
; ===================================
; Production
display_errors=Off
display_startup_errors=Off
log_errors=On
error_log=/var/log/php_errors.log
; Development (comment out in production)
; display_errors=On
; display_startup_errors=On
; error_reporting=E_ALL
; ===================================
; SECURITY
; ===================================
expose_php=Off
allow_url_fopen=On
allow_url_include=Off
; ===================================
; DATE/TIME
; ===================================
date.timezone=UTC