htaccess error: Require not allowed in <Files> context

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Cohaven
Registered User
Posts: 14
Joined: Wed Oct 18, 2017 2:53 pm

htaccess error: Require not allowed in <Files> context

Post by Cohaven » Wed Nov 14, 2018 8:48 pm

I'm trying to upgrade to the latest version of phpbb3.2 by following this guide, but I'm getting a 500 Internal Server Error and the following error in my apache 2.4 error log when I try to access the /install directory through the browser:

Code: Select all

C:/website/forum/.htaccess: Require not allowed in <Files> context
I tried googling for the "Require not allowed in Files context" error, but there are literally no results. Must be a rare or a newly introduced error.

The htaccess in question contains the following:

Code: Select all

<IfModule mod_version.c>
    <IfVersion < 2.4>
        <Files "config.php">
            Order Allow,Deny
            Deny from All
        </Files>
        <Files "common.php">
            Order Allow,Deny
            Deny from All
        </Files>
    </IfVersion>
    <IfVersion >= 2.4>
        <Files "config.php">
            Require all denied
        </Files>
        <Files "common.php">
            Require all denied
        </Files>
    </IfVersion>
</IfModule>
<IfModule !mod_version.c>
    <IfModule !mod_authz_core.c>
        <Files "config.php">
            Order Allow,Deny
            Deny from All
        </Files>
        <Files "common.php">
            Order Allow,Deny
            Deny from All
        </Files>
    </IfModule>
    <IfModule mod_authz_core.c>
        <Files "config.php">
            Require all denied
        </Files>
        <Files "common.php">
            Require all denied
        </Files>
    </IfModule>
</IfModule>
Any idea how to solve this?

I used the command mentioned in the guide as an alternative to the install directory steps and completed the guide, but even accessing the root forum url still gives the same error, so this issue is not related to the "install/" instructions.

User avatar
3Di
Registered User
Posts: 13113
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: htaccess error: Require not allowed in <Files> context

Post by 3Di » Wed Nov 14, 2018 8:58 pm

:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

Cohaven
Registered User
Posts: 14
Joined: Wed Oct 18, 2017 2:53 pm

Re: htaccess error: Require not allowed in <Files> context

Post by Cohaven » Wed Nov 14, 2018 9:10 pm

I think the source code directory defined in httpd.conf was missing AuthConfig option for the AllowOverride directive. The "Require" directive needs AuthConfig according to this doc.

The error disappeared when I added AuthConfig, but I can't confirm if the forum is accessible yet due to some likely code-level redirects that I have set up and need to disable.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: </Solidjeuh>, AmigoJack, Bermudez, droomeg, Yandex [Bot] and 25 guests