為 PHP 專案設定 php.ini 檔

做法

設定 php.ini 檔。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
memory_limit = 256M
max_execution_time = 60
upload_max_filesize = 100M
post_max_size = 100M

date.timezone = "Asia/Taipei"

realpath_cache_size = 128M
realpath_cache_ttl = 86400

opcache.enable = On
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 64
opcache.max_accelerated_files = 50000
opcache.revalidate_freq = 60

session.cookie_httponly = On
session.cookie_secure = On
session.use_strict_mode = On

log_errors = On
error_log = /proc/self/fd/2

參考資料