Skip to content

Instantly share code, notes, and snippets.

@chales
Last active August 29, 2015 13:58
Show Gist options
  • Save chales/10233819 to your computer and use it in GitHub Desktop.
Save chales/10233819 to your computer and use it in GitHub Desktop.
Common php.ini overrides for production. Added at the end of a main php.ini or in /etc/php5/conf.d/
; RESOURCES
max_execution_time = 120
max_input_time = 120
memory_limit = 260M
; UPLOAD
file_uploads = 1
;upload_tmp_dir = '/tmp'
upload_max_filesize = 150M
post_max_size = 150M
; SECURITY
expose_php = Off
allow_url_fopen = On
safe_mode = Off
magic_quotes_gpc = Off
register_globals = Off
mbstring.http_input = 'pass'
mbstring.http_output = 'pass'
mbstring.encoding_translation = Off
; ERROR HANDLING
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
log_errors = On
display_startup_errors = Off
html_errors = Off
ignore_repeated_errors = On
define_syslog_variables = Off
error_log = php_errors.log
; GARBAGE COLLECTION
session.auto_start = 0
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 2000000
session.cookie_lifetime = 2000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment