php disable_functions 函数列表
禁用不安全的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函数,这是必须的
复制代码
代码如下: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函数,这是必须的
相关推荐
Noneyes 2020-11-10
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23