.user.ini文件中的PHP disable_functions给出“无值".在phpinfo()输出中 [英] PHP disable_functions in .user.ini file gives "no value" in phpinfo() output

查看:230
本文介绍了.user.ini文件中的PHP disable_functions给出“无值".在phpinfo()输出中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将以下代码放在apache虚拟主机文档根目录下的.user.ini文件中.当我查看phpinfo()输出时,disable_functions字段显示无值".请帮助我找出原因.

I put the following code in .user.ini file under apache virtual host document root. And when I view the phpinfo() output, the disable_functions fields says "no value". Please help me to figure out why.

("memory_limit"和"max_execution_time"设置正确.)

(The "memory_limit" and "max_execution_time" are setting correctly.)

谢谢.

memory_limit = 2048M
max_execution_time = 3600
disable_functions = apache_child_terminate,apache_get_modules,apache_getenv,apache_note,apache_setenv,curl_multi_exec,define_syslog_variables,disk_free_space,diskfreespace,dl,fpassthru,ftp_connect,ftp_exec,ftp_get,ftp_login,ftp_nb_fput,ftp_put,ftp_raw,ftp_rawlist,get_current_user,getmyuid,highlight_file,ini_alter,ini_get_all,ini_restore,link,ini_set,mysql_list_dbs,openlog,parse_ini_file,passthru,pclose,pcntl_exec,pfsockopen,php_uname,pcntl_alarm,pcntl_fork,pcntl_get_last_error,pcntl_signal,pcntl_getpriority,pcntl_setpriority,pcntl_strerror,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_waitpid,pcntl_wait,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,popen,posix_getgrgid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,socket_accept,socket_bind,socket_create,socket_create_listen,socket_create_pair,socket_listen,shell_exec,show_source,socket_select,socket_strerror,stream_select,syslog,symlink,system

推荐答案

@Charles是正确的,PHP手册明确指出 disable_functions 只能在主 php.ini .这显然会破坏每个虚拟机的自定义值.

@Charles is right, the PHP Manual clearly states that disable_functions can only be set in the master php.ini. This clearly defeats per-vhost custom value.

如果启用了uopz PECL扩展,则有一个解决方法.检查我的其他答案详细信息.

There's a workaround for this if you have uopz PECL extension enabled. Check my other answer for details.

这篇关于.user.ini文件中的PHP disable_functions给出“无值".在phpinfo()输出中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆