Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2686

A mod_rewrite error may erroneously occur during GUI install

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.2
    • Fix Version/s: 4.3.0-b2
    • Component/s: None
    • Labels:
      None

      Description

      The following error may be encountered when attempting to install Blesta:

      Mod rewrite is not enabled, or htaccess is not supported by this server. You must disable pretty URL support in Blesta by removing the .htaccess file.

      This occurs either when mod_rewrite is not enabled on the server, or in the case of this task, when Apache MultiViews is enabled on the server. Because the Blesta install URI /install/ does not actually exist, Apache will look for files named install.* and it will find and load install.php, which is the file that displays the mod_rewrite error.

      Blesta has no need to support MultiViews since the framework handles routing, so

      1. Disable Apache MultiViews in the .htaccess file:
        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>
        

      When installing Blesta 4.2.2 on PHP 7.0.27 I encountered the mod_rewrite error, which says essentially that mod_rewrite is not enabled and that you must delete the .htaccess file to proceed. The problem is that mod_rewrite was enabled.

      I was able to complete installation by renaming the .htaccess file. Once installation via GUI was completed, I restored the .htaccess file back, and pretty URL's worked fine, which confirmed that mod_rewrite was in fact enabled.

      Looking into it, we have had several customers complain about this error.

      It appears that the check we are performing to see if mod_rewrite is enabled may not work properly in some versions of PHP/Apache. We should look into how this check is performed, and update as necessary.

        Activity

        admin Paul Phillips created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Sprint 4.3.0 Sprint 9 [ 60 ]
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        jonathan Jonathan Reissmueller made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour, 12 minutes [ 4320 ]
        Worklog Id 11170 [ 11170 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 1 hour, 12 minutes [ 4320 ] 1 hour, 58 minutes [ 7080 ]
        Worklog Id 11175 [ 11175 ]
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.3.0 Sprint 9 [ 60 ] 4.3.0 Sprint 9, 4.3.0 Sprint 10 [ 60, 61 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.3.0-b2 [ 11100 ]
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.3.0 Sprint 9, 4.3.0 Sprint 10 [ 60, 61 ] 4.3.0 Sprint 9, 4.3.0 Sprint 10, 4.3.0 Sprint 11 [ 60, 61, 62 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        Fix Version/s 4.3.0-b1 [ 11019 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 1 hour, 58 minutes [ 7080 ] 3 hours, 14 minutes [ 11640 ]
        Worklog Id 11269 [ 11269 ]
        tyson Tyson Phillips (Inactive) made changes -
        Description When installing Blesta 4.2.2 on PHP 7.0.27 I encountered the mod_rewrite error, which says essentially that mod_rewrite is not enabled and that you must delete the .htaccess file to proceed. The problem is that mod_rewrite was enabled.

        I was able to complete installation by renaming the .htaccess file. Once installation via GUI was completed, I restored the .htaccess file back, and pretty URL's worked fine, which confirmed that mod_rewrite was in fact enabled.

        Looking into it, we have had several customers complain about this error.

        It appears that the check we are performing to see if mod_rewrite is enabled may not work properly in some versions of PHP/Apache. We should look into how this check is performed, and update as necessary.
        The following error may be encountered when attempting to install Blesta:
        {quote}
        Mod rewrite is not enabled, or htaccess is not supported by this server. You must disable pretty URL support in Blesta by removing the .htaccess file.
        {quote}

        This occurs either when mod_rewrite is not enabled on the server, or in the case of this task, when [Apache MultiViews|httpd.apache.org/docs/current/mod/mod_negotiation.html#multiviews] is enabled on the server. Because the Blesta install URI _/install/_ does not actually exist, Apache will look for files named _install.*_ and it will find and load _install.php_, which is the file that displays the mod_rewrite error.

        Blesta has no need to support MultiViews since the framework handles routing, so
        # Disable Apache MultiViews in the .htaccess file:
        {code}
        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>
        {code}


        ----

        When installing Blesta 4.2.2 on PHP 7.0.27 I encountered the mod_rewrite error, which says essentially that mod_rewrite is not enabled and that you must delete the .htaccess file to proceed. The problem is that mod_rewrite was enabled.

        I was able to complete installation by renaming the .htaccess file. Once installation via GUI was completed, I restored the .htaccess file back, and pretty URL's worked fine, which confirmed that mod_rewrite was in fact enabled.

        Looking into it, we have had several customers complain about this error.

        It appears that the check we are performing to see if mod_rewrite is enabled may not work properly in some versions of PHP/Apache. We should look into how this check is performed, and update as necessary.
        tyson Tyson Phillips (Inactive) made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Time Spent 3 hours, 14 minutes [ 11640 ] 3 hours, 27 minutes [ 12420 ]
        Worklog Id 11270 [ 11270 ]
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Jonathan Reissmueller [ jonathan ] Tyson Phillips [ tyson ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #467 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              29/Jun/18

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 3 hours, 27 minutes
              3h 27m

                Agile