# UK Data Services - Custom PHP Configuration for Production

# Performance Settings
memory_limit = 256M
max_execution_time = 300
max_input_time = 300
post_max_size = 50M
upload_max_filesize = 50M
max_file_uploads = 20

# Session Configuration
session.save_handler = redis
session.save_path = "tcp://redis:6379"
session.gc_maxlifetime = 3600
session.cookie_secure = 1
session.cookie_httponly = 1
session.cookie_samesite = "Strict"

# Security Settings
expose_php = Off
allow_url_fopen = Off
allow_url_include = Off
enable_dl = Off
file_uploads = On
auto_globals_jit = On

# Error Handling
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = /var/www/html/logs/php_errors.log
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

# Date/Time
date.timezone = Europe/London

# OPcache Configuration (Performance)
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

# Compression
zlib.output_compression = On
zlib.output_compression_level = 6

# Custom extensions for data processing
extension=zip
extension=curl
extension=json
extension=xml
extension=gd
extension=mysqli
extension=pdo_mysql

# Email configuration (if using PHP mail)
sendmail_path = /usr/sbin/sendmail -t -i

# Custom settings for UK Data Services
; Application-specific settings
ukds.log_level = "INFO"
ukds.cache_enabled = 1
ukds.debug_mode = 0