当前位置: 代码网 > 服务器>网络安全>脚本攻防 > php disable_functions 函数列表

php disable_functions 函数列表

2011年09月29日 脚本攻防 我要评论
php disable_functions 函数列表虚拟主机配置,建议禁止php函数列表,禁用不安全的PHP函数... 11-09-29
禁用不安全的php函数,有些php函数是不够安全的,我们必须要加强安全配置,如果做虚拟主机,建议禁止php函数列表如下:

复制代码
代码如下:

disable_functions = system,exec,shell_exec,passthru,proc_open,proc_close, proc_get_status,checkdnsrr,getmxrr,getservbyname,getservbyport, syslog,popen,show_source,highlight_file,dl,socket_listen,socket_create,socket_bind,socket_accept, socket_connect, stream_socket_server, stream_socket_accept,stream_socket_client,ftp_connect, ftp_login,ftp_pasv,ftp_get,sys_getloadavg,disk_total_space, disk_free_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname

php.ini 里面的 disable_functions 开关选项可关闭一些危险的函数,比如system,exec 等,比如: disable_functions = phpinfo , 如果在文件中调用 phpinfo() 函数,那么在 error_reporting 开启的情况下,会提示如下错误:
warning: phpinfo() has been disabled for security reasons
目前发现万网主机是屏蔽此函数的。
利用 google: inurl:phpinfo.php 就可查看大量的主机信息,一般为管理员进行调试的时候放上未删除的文件。禁用不安全的php函数,这是必须的
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com