热烈推荐本博客子网站:免费代码网 | →美丽生活网 | →极品笑话网 | →服务器安全



服务器安全维护

防止PHP木马,应在PHP.INI里禁止的一些函数

disable_functions = system,passthru,exec,shell_exec,phpinfo,get_current_user,ini_restore,dl,scandir,popen,proc_open,opendir

其中opendir这个是文件浏览的重要函数,禁了这个,大部分PHP木马都没门了。

不过会对一些正常的PHP有时候会造成影响,但是不影响正常使用。比如DZ论坛的后台 文件校验、运行记录等。就有影响了。。。



更严格的一组限制函数
disable_functions = phpinfo,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,

ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,

get_current_user,leak,putenv,popen,opendir

[本日志由 fengyn 于 2010-06-15 09:51 PM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: PHP木马 php安全
相关日志:
评论: 1 | 引用: 0 | 查看次数: -
回复回复fengyn2[2011-05-27 06:11 PM | del]
国外免费主机禁用的函数 参考
system
exec
shell_exec
proc_open
passthru
set_time_limit
error_log
ini_alter
dl
pfsockopen
openlog
syslog
readlink
symlink
link
leak
popen
escapeshellcmd
apache_child_terminate
apache_get_modules
apache_get_version
apache_getenv
apache_note
apache_setenv
virtual
mb_send_mail
pcntl_exec
socket_connect
socket_create
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.

Freeb资源论坛----寻找免费资源的路上,我们陪你一路通行!