htaccess php_flag not allowed here

By | June 13, 2011

If using this code

<IfModule mod_php5.c>
	#Turn off php register globals
	php_flag register_globals off
</IfModule>

gives the error :

.htaccess: php_flag not allowed here

in /var/log/apache/error.log

Then Options should be added to AllowOverride in : /etc/apache2/sites-available/default

AllowOverride FileInfo Options

like this

<Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride FileInfo Options
                Order allow,deny
                allow from all
        </Directory>
About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].

Leave a Reply

Your email address will not be published.