.htaccess中的php_flag

Rei*_*ims 1 php apache .htaccess

我运行一个apache-server,我只需要一个php_flag与虚拟主机中的全局配置不同.

我在该虚拟主机目录中没有.htaccess文件,所以我只是添加了它

php_flag flagname On
Run Code Online (Sandbox Code Playgroud)

我的httpd.conf包含

<Directory "/path/to/host">
AllowOverride All
</Directory>
Run Code Online (Sandbox Code Playgroud)

我使用标准服务器API,而不是suPHP或任何东西

无论如何,phpinfo一直告诉我,我设置为On的标志仍然是Off.标志是suhosin.simulation,应该可以在.htaccess中设置.

我错过了什么?

Ter*_*ryE 5

php_flag只能设置PHP_INI_ALLPHP_INI_PERDIR类型指令.您可能需要在vhost配置中php_admin_flag<Directory xxxxxxxxxx> </Directory>范围内使用.您将需要重新启动Apache来锁定它.