[PHP]
; Performance
memory_limit = 256M
max_execution_time = 300
max_input_time = 300
post_max_size = 100M
upload_max_filesize = 100M

; Error reporting
display_errors = Off
display_startup_errors = Off
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors = On
error_log = /var/log/php-error.log

; Date
date.timezone = America/Bogota

; Security
expose_php = Off
allow_url_fopen = On
allow_url_include = Off
disable_functions = 

; cURL - usar CA bundle del sistema (Alpine actualizado)
[curl]
curl.cainfo = /etc/ssl/certs/ca-certificates.crt

; Session — usar variables de entorno para Redis (Coolify las inyecta)
session.save_handler = redis
session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?auth=${REDIS_PASSWORD}"
session.gc_maxlifetime = 3600
session.cookie_httponly = 1
session.use_strict_mode = 1

; OPcache (importante para performance)
opcache.enable = 1
opcache.enable_cli = 0
opcache.memory_consumption = 128
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 10000
opcache.max_wasted_percentage = 5
opcache.validate_timestamps = 0
opcache.revalidate_freq = 0
opcache.fast_shutdown = 1

; Realpath cache (mejora performance de includes)
realpath_cache_size = 4096K
realpath_cache_ttl = 600

; Output buffering
output_buffering = 4096

; Redis
extension = redis.so
