# PHP生产环境配置

# 基础设置
memory_limit = 256M
max_execution_time = 60
max_input_time = 60
post_max_size = 100M
upload_max_filesize = 100M
max_file_uploads = 20

# 错误报告（生产环境）
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = /var/log/php_errors.log
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

# 会话设置
session.save_handler = redis
session.save_path = "tcp://redis:6379"
session.gc_maxlifetime = 1440
session.cookie_lifetime = 0
session.cookie_secure = 0
session.cookie_httponly = 1
session.use_strict_mode = 1

# OPcache设置
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 128
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 2
opcache.fast_shutdown = 1
opcache.validate_timestamps = 0

# 时区设置
date.timezone = Asia/Shanghai

# 其他设置
expose_php = Off
allow_url_fopen = On
allow_url_include = Off
default_charset = "UTF-8"