.htaccess: php_flag not allowed here

Many websites suggest that you add "AllowOverride All" to your apache configuration to allow the use of php_flag in .htaccess files. But in fact you only have to add "Options", like this:

Directory "/var/www/example"
<Directory "/var/www/example">
AllowOverride  FileInfo Limit Options
...
</Directory>

Check this link to see if a specific php value can be set in an .htaccess file:
http://php.net/manual/de/ini.list.php

Share