本文介绍了php_admin_value disable_functions 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试禁用 apache2 配置文件中的功能,但由于某种原因它不起作用.我已经验证其他 php_admin_value 设置有效,但它只是忽略了 disable_functions

I'm trying to disable functions, in my apache2 config file, but it's not working for some reason. I've verified that other php_admin_value settings ARE working, but it's just ignoring disable_functions

这是我所拥有的:

<Directory "/var/www/testdir/*">

php_admin_value open_basedir "/var/www/testdir"
php_admin_value disable_functions "exec,shell_exec"

</Directory>

open_basedir admin 值按预期工作(不能包含 '../something'),但是,它仍然会执行 ls -a .. 或让我 exec('ls -a ..', $output);echo $output; 就好像没有设置 disable_functions 标志一样.

The open_basedir admin value is working as expected (cannot include '../something'), but yet, it will still exec ls -a .. or let me exec('ls -a ..', $output); echo $output; as if the disable_functions flag was not even set.

关于如何解决这个问题有什么想法吗?

Any ideas on how to fix this?

推荐答案

disable_functions 只能在 php.ini 文件中更改:

Name                Default Changeable          Changelog
disable_functions   ""      PHP_INI_SYSTEM only Available since PHP 4.0.1.

然而,php_admin_value 不能在 .htaccess 文件中使用.

However, php_admin_value can not be used in an .htaccess file.

这篇关于php_admin_value disable_functions 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 17:41