的php_flag在.htaccess [英] php_flag in .htaccess

查看:318
本文介绍了的php_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.

我没有在虚拟主机目录的.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.

这篇关于的php_flag在.htaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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