的php_flag在.htaccessphp_flag、htaccess

由网友(伊染年华丶泪蹒跚)分享简介:我运行一个Apache服务器,我只需要一个的php_flag从全局配置中的虚拟主机不同。I run an apache-server and I need just one php_flag to differ from the global configuration in a virtual host.我没有在...

我运行一个Apache服务器,我只需要一个的php_flag从全局配置中的虚拟主机不同。

I run an apache-server and I need just one php_flag to differ from the global configuration in a virtual host.

我没有在虚拟主机目录的.htaccess文件,所以我只是说含有它

I did not have a .htaccess file in that virtual hosts directory, so I just added it containing

php_flag flagname On

我的httpd.conf中包含

My httpd.conf contains

<Directory "/path/to/host">
AllowOverride All
</Directory>

和我用的是标准的服务器API,而不是suPHP或任何

and I use the standard server API, not suPHP or anything

反正的phpinfo不断告诉我,我设置在标志仍然关闭。 该标志是suhosin.simulation,一个人应该能够在.htaccess中设置。

Anyway, phpinfo keeps telling me that the flag I set to On was still Off. The flag is suhosin.simulation, that one should be able to be set in .htaccess.

我在想什么?

推荐答案

的php_flag 只能将 PHP_INI_ALL 和 PHP_INI_PERDIR 类型的指令。您可能需要使用 php_admin_flag &LT;目录XXXXXXXXXX&GT; &LT; /目录&GT ; 范围在你的虚拟主机配置。您将需要重新启动Apache来锁定这一点。

php_flag can only set PHP_INI_ALL and PHP_INI_PERDIR type directives. You may need to use a php_admin_flag within a <Directory xxxxxxxxxx> </Directory> scope in your vhost config. You will need to restart Apache to latch this.

阅读全文

相关推荐

最新文章