安全防护技巧

生产环境php.ini配置文件修改

一般来说需要修改以下几处:

output_buffering = Off
output_buffering = On

;cgi.fix_pathinfo=0
cgi.fix_pathinfo=0,防止Nginx文件类型错误解析漏洞。

;open_basedir =
open_basedir = /usr/local/www/:/tmp/

error_reporting = E_ALL | S_STRICT
error_reporting = E_ALL & ~E_NOTICE

log_errors = Off
log_errors = On (根据个人情况)

;error_log = filename
error_log = /var/log/php.log

;cgi.fix_pathinfo=0
cgi.fix_pathinfo=0

;date.timezone =
date.timezone = PRC

short_open_tag = Off
short_open_tag = On

 

全国客服电话: 400-001-7880
值班技术:
13330159245

                       

扫一扫,咨询客服