To enable php_value in .htaccess , the AllowOverride directive for this directory must be configured accordingly.
AllowOverride All
would do it, but it might be common. Again, I donβt know if there is a more restrictive setting that still allows you to set PHP configuration parameters in .htaccess .
For obvious reasons, AllowOverride cannot be installed in .htaccess itself.
In addition, as Colonel Shrapnel mentioned, PHP must be used as an Apache module in order to be able to change PHP configuration settings through the Apache configuration. Check the Apache error log to see the actual cause.
source share