服务器中PHP相对安全的设置
默认安装的php需要有以下几个注意的问题:
C:\winnt\php.ini只给予users读权限即可。在php.ini里需要做如下设置:
Safe_mode=on
register_globals = Off
allow_url_fopen = Off
display_errors = Off
magic_quotes_gpc = On [默认是on,但需检查一遍]
open_basedir =web目录
disable_functions =passthru,exec,shell_exec,system,phpinfo,get_cfg_var,popen,chmod
默认设置com.allow_dcom = true修改为false[修改前要取消掉前面的;]
C:\winnt\php.ini只给予users读权限即可。在php.ini里需要做如下设置:
Safe_mode=on
register_globals = Off
allow_url_fopen = Off
display_errors = Off
magic_quotes_gpc = On [默认是on,但需检查一遍]
open_basedir =web目录
disable_functions =passthru,exec,shell_exec,system,phpinfo,get_cfg_var,popen,chmod
默认设置com.allow_dcom = true修改为false[修改前要取消掉前面的;]
顶(0)
踩(0)
- 最新评论