Upgrade 6.5.22 to 7.6.1 - ERROR: Could not verify .htaccess is working:

Upgraded from 6.5.21 to 6.5.22 without issue. Now; when I try to upgrade from 6.5.22 to 7.6.1 I receive, ERROR: Could not verify .htaccess is working. in the Pre-upgrade stage. I have AllowOverride All. Any Idea on how to resolve would be appreciated.

- David

  • First off, I would check the .htaccess file itself to see if it is obviously corrupted in some way.  Though, in general, these sorts of problems are traced back to not having "AllowOverride All" set up properly in some way.  Had you upgraded system packages for Apache lately?  Customized Apache config files can get replaced or backed up during these sorts of updates.

    Upgrading sugar 6.5.18 to 7.5.0.1. I'm getting error in pre check.

    I would check that the user that you are using to run upgrade has appropriate file permissions to Sugar web directory.  As part of the .htaccess check, the install writes a file to disk that it expects to find.

    App Ecosystem @ SugarCRM

  • Matt:

    My config.d looks like this:

    #EBD ELMS - for upgeade testing

    #Added 02-24-2016

    <VirtualHost 172.16.100.176:80>

        ServerName EBDted.staging.expertbizdev.com

        DocumentRoot /var/www/vhosts/EBDted.staging.expertbizdev.com

    #    Redirect / https://EBDted.staging.expertbizdev.com   

        <Directory /var/www/vhosts/EBDted.staging.expertbizdev.com>

            AllowOverride All

        </Directory>

        CustomLog logs/EBDted.staging.expertbizdev.com-access_log combined

        ErrorLog logs/EBDted.staging.expertbizdev.com-error_log

    </VirtualHost>

    _______________________________________________________________________

    My .htaccess looks like this:

    # BEGIN SUGARCRM RESTRICTIONS

    RedirectMatch 403 (?i).*\.log$

    RedirectMatch 403 (?i)/+not_imported_.*\.txt

    RedirectMatch 403 (?i)/+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl)

    RedirectMatch 403 (?i)/+emailmandelivery\.php

    RedirectMatch 403 (?i)/+upload

    RedirectMatch 403 (?i)/+cache/+diagnostic

    RedirectMatch 403 (?i)/+files\.md5$

    <IfModule mod_rewrite.c>

        Options +FollowSymLinks

        RewriteEngine On

        RewriteBase /

        RewriteRule ^cache/jsLanguage/(.._..).js$ index.php?entryPoint=jslang&module=app_strings&lang=$1 [L,QSA]

        RewriteRule ^cache/jsLanguage/(\w*)/(.._..).js$ index.php?entryPoint=jslang&module=$1&lang=$2 [L,QSA]

    </IfModule>

    # END SUGARCRM RESTRICTIONS

    ________________________________________________________________________________________________________

    I checked all the permissions and still get the below error.

    Starting script CheckAllowOverride

    Fri, 26 Feb 2016 13:14:33 -0600 [Upgrader] - Testing .htaccess redirects

    Fri, 26 Feb 2016 13:14:33 -0600 [Upgrader] - PHP: [2] file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/vhosts/EBDted.staging.expertbizdev.com/cache/upgrades/temp/SugarPro-Upgrade-6.5.22-to-7.6.1.0/upgrade/scripts/pre/CheckAllowOverride.php at 56

    Fri, 26 Feb 2016 13:14:33 -0600 [Upgrader] - PHP: [2] file_get_contents(http://ebdted.expertbizdev.com/itest.test): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/vhosts/EBDted.staging.expertbizdev.com/cache/upgrades/temp/SugarPro-Upgrade-6.5.22-to-7.6.1.0/upgrade/scripts/pre/CheckAllowOverride.php at 56

    Fri, 26 Feb 2016 13:14:33 -0600 [Upgrader] - ERROR: Could not verify .htaccess is working:

    Fri, 26 Feb 2016 13:14:33 -0600 [Upgrader] - Finished script CheckAllowOverride

    Fri, 26 Feb 2016 13:14:33 -0600 [Upgrader] - ERROR: Pre-upgrade stage failed!

    - David

  • It seems like PHP cannot reach http://ebdted.expertbizdev.com/

    Are you trying to upgrade your staging environment?  Looks like your system's hostname is different what the installer is using.

    Try running upgrade using this as your Site URL

    http://EBDted.staging.expertbizdev.com/

    By the way, you planning on coming to SugarCon this year? I don't recall if I saw you last year.

    App Ecosystem @ SugarCRM

  • Matt:

    Thanks for your eyes on this. I had the URL wrong in the config.php. Guess i'm going blind. Thanks for the help. Now I have another issue;  ERROR: Exception: Unable to create directory: /var/www/vhosts/EBDted.staging.expertbizdev.com/upgrade/scripts/post.

    I was not at  SugarCon last year; hopefully I will be there this year.

    - Daved  

  • I'd check file permissions on that directory for the apache / upgrade user.  Or perhaps there is something stale there that needs to be cleared out.

    Hope to see you at SugarCon!

    App Ecosystem @ SugarCRM