Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15481

potentially invalid usage of Order directive in Files context in .htaccess file

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.1.11
    • None
    • None
    • None
    • Apache 2.2.22-13+deb7u12
      PHP 5.4.45-0+dev7u11

    Description

      The .htaccess file in the phpbb3 root directory contains the following settings:

      <Files "config.php">
      Order Allow,Deny
      Deny from All
      </Files>
       
      <Files "common.php">
      Order Allow,Deny
      Deny from All
      </Files>
      

      When start the server and try to access the forum in the browser with these settings in that file, I get an "Internal Server error" warning page and the apache2 log stating:

      "[...]/.htaccess: order not allowed here".
      

      According to [1] the Order directive is only allowed in a directory or .htaccess (i.e. root of the .htaccess file) context but not in a Files context. I also got this confirmed on the #httpd IRC channel. FWIW: The apache 2.2 docs state the same in this regards.

      I'm sure I'm missing something here, since I doubt that phpbb3 would ship with an invalid .htaccess file. However, I'm failing to find any trace pointing to a different explanation other than this being simply an invalid configuration. Note that this includes the phpBB community forums, where searching for this error brings up several threads where all of them I checked suggest to simply remove the offending .htaccess file (certainly not a viable/intended option) [2].

      [1] http://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#order
      [2] https://www.phpbb.com/search/?q=order+not+allowed+here

      Attachments

        Activity

          People

            Unassigned Unassigned
            Luke1410 Luke1410 [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: