Php Shell Exec已禁用
我的服务器上的shell exec有点问题。 在完成一些教程之后,我更改了我的php.ini:Php Shell Exec已禁用,php,apache,shell,shell-exec,suhosin,Php,Apache,Shell,Shell Exec,Suhosin,我的服务器上的shell exec有点问题。 在完成一些教程之后,我更改了我的php.ini: safe_mode Off disable_functions pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl
safe_mode Off
disable_functions pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
suhosin.executor.func.blacklist passthru, show_source, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec
这是我的phpinfo(),没有对shell_exec命令的引用。我不知道这个suhosin.executor.func.blacklist来自哪里,因为它在my/etc/php5/apache2/conf.d/suhosin.ini中被注释掉了
我在Ubuntu 12.04下使用zpanel。谢谢大家! 在所有可能的php.ini文件中搜索
suhosin.executor.func.blacklist
可能会有所帮助,例如
grep -r suhosin.executor.func.blacklist /etc/php5
该条目也可以从应用程序目录或父目录中的.htaccess中设置,例如
grep -r suhosin.executor.func.blacklist /var/www/
phpinfo()
列出.ini文件的目录,例如:
Scan this dir for additional .ini files => /foo/bar
Additional .ini files parsed => /foo/bar/php.ini
它来自apachevhost Conf文件。 通常位于 /etc/zpanel/configs/apache/httpd-vhosts.conf 如果找不到VHOST conf文件,请尝试 Zpanel->Admin->Module Admin->点击“Apache配置” 然后找到“apachevhost Conf”路径
然后将该文件打开到任何文本编辑器中,并删除自定义vhost的该值。首先需要查找httpd.conf文件
#find/-type f-name“httpd.conf”
然后逐个打开文件并搜索shell_exec word或黑名单word
范例
#nano/etc/usrname/configs/apache/httpd vhosts.conf
按ctrl+w并键入suhosin.executor.func.blacklist,然后按enter键
从此行中删除shell_exec并保存文件,保存文件后重新启动apache
#服务httpd重启