Allow using php_value and php_flag in .htaccess

Try to add the "Directory" directive inside the virtualhost rather than in the default apache2.conf. Also if this is in ubuntu/debian, you will need to make the changes in /etc/apache2/sites-available/default , if you are not using any additional virtualhosts.