工作笔记04----------禁用PHP危险函数
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了工作笔记04----------禁用PHP危险函数相关的知识,希望对你有一定的参考价值。
禁用php函数
1、禁用PHP不安全函数:
vim /usr/local/php/etc/php.ini
disable_functions = system,exec,shell_exec,passthru,proc_open,proc_close, proc_get_status,checkdnsrr,getmxrr
disable_functions = getservbyport, syslog,popen,show_source,highlight_file,dl,socket_listen,socket_create,socket_bind
disable_functions = socket_accept, socket_connect,getservbyname,posix_times,posix_ttyname,posix_uname
disable_functions = posix_getrlimit, posix_getsid,posix_getuid,posix_get_last_error
disable_functions = stream_socket_server, stream_socket_accept,stream_socket_client,posix_isatty, posix_kill,posix_getgrgid
disable_functions = posix_getgrnam,posix_getgroups,posix_getlogin,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid
disable_functions = ftp_connect, ftp_login,ftp_pasv,ftp_get,sys_getloadavg,disk_total_space, disk_free_space,posix_ctermid
disable_functions = posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid,
disable_functions = posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror
2、禁用PHP不安全类
disable_classes = SQLiteDatabase,SQLiteResult,SQLiteUnbuffered,SQLiteException
3、重启PHP-FPM
systemctl restart php-fpm
本文出自 “boyhack” 博客,请务必保留此出处http://461205160.blog.51cto.com/274918/1949724
以上是关于工作笔记04----------禁用PHP危险函数的主要内容,如果未能解决你的问题,请参考以下文章