; X-Server Mobile 生产环境 PHP 配置 ; 文件位置: backend/php-prod.ini ; 用途: Docker 容器内的 PHP 生产环境配置 ; ============================================ ; OPcache 配置 ; ============================================ opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=10000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.save_comments=1 ; ============================================ ; 错误处理 ; ============================================ display_errors=0 display_startup_errors=0 log_errors=1 error_log=/app/runtime/logs/php_errors.log error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT ; ============================================ ; 安全配置 ; ============================================ expose_php=Off allow_url_fopen=On allow_url_include=Off ; 禁用危险函数(根据实际需求调整) ; disable_functions=exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source ; ============================================ ; 性能配置 ; ============================================ max_execution_time=60 max_input_time=60 memory_limit=256M post_max_size=50M upload_max_filesize=50M max_file_uploads=20 ; ============================================ ; 会话配置 ; ============================================ session.cookie_httponly=1 session.cookie_secure=1 session.use_strict_mode=1 session.cookie_samesite="Lax" ; ============================================ ; 其他配置 ; ============================================ date.timezone=Asia/Shanghai default_charset="UTF-8"