The rewrite test failed

Hello

I've tried to solve the following error message through many ways - including setting persmission, etc - but still getting the same message.

Error Message during Install: "The rewrite test failed and the most likely cause is that AllowOverride is not set to All for Elgg's directory....."

Elgg: 1.8.1
Host: Arvixe

Has anyone found the solution for this problem?

 

  • You're most likely missing the required .htaccess file.

    If the permissions are set properly I think elgg will create this for you.  You can always rename (or copy) the htaccess_dist file to .htaccess

  • well, no, since I do see .htaccess file - and it's created everytime I refresh the install page - which also validates that alteast on root folder I do have the correct file permissions.

  • I've also encountered this in my environment (using Oracle Virtualbox running a guest Debian LAMP server, sharing the /var/www filesystem, i.e. the web root, with the Win7 host). There was no apparent reason as what could have caused the problem - .htaccess was there, AllowOverride was set to all, file system was writable. I ended up "fixing" the issue with a little hack: I manually stepped over this check and forced the installer to go to the next step. I'm using my 1.8.* sites with no problem since this hacky installation.

    So when you hit this wall, simply enter the next installation step's url in your browser: http://your-site-url/install.php?step=database

    I understand this is far from a proper solution, but worked for me. Hope it helps you.

  • @Andras - If you can duplicate this error please report it to trac so we can fix the installer.

    @Arsalan - Arvixe has pretty good customer support. Have you tried contacting them yet to make sure the site is configured for Elgg?

  • You may not have the mod_rewrite Apache module installed - it isn't by default.

    I didn't, I got this message, I do now, I no longer have the message. 

  • eXploreOpinion

    I had the same problem with my host/server. This seems to happen with Ubuntu server.  Try turning AllowOverride to ALL.  If you can't do that for some reason,  turn ElggRerwiteTest off in ...install/ElggRewriteTest.php.

    That should get you past the rewrite test, after which you'll find a link to test it...  if you get a page after with "success" rewrite is enabled.

    That's how I got past it with my host who run ubuntu server.

    Hope this helps

  • Same behaviour in my Debian install:

    Apache virtual hosting: 

    <VirtualHost xxx.xxx.xxx.xxx:80>

            ServerName  elgg.domain.org

            DocumentRoot /path/to/elgg-1.8.3

            <Directory />

                Options FollowSymLinks

                AllowOverride None

            </Directory>

            <Directory /path/to/elgg-1.8.3/>

                Options Indexes FollowSymLinks MultiViews

                AllowOverride All

                Order allow,deny

                allow from all

            </Directory>

            ErrorLog /var/log/apache2/error_elgg.log

            LogLevel warn

            CustomLog /var/log/apache2/access_elgg.log combined

    </VirtualHost>

     

    .htaccess created by install process

    RewriteBase / line uncommented in .htaccess file

    desperate chmod 777 at  /path/to/elgg-1.8.3 directory

     

    no way, know issue in install.php?step=requirements


    The rewrite test failed and the most likely cause is that AllowOverride is not set to All for Elgg's directory... etc.


    somebody knows what am I doing wrong?

    thanks in advance.

     

    Alberto.

     

     

     

     

     

     

  • Solved for me.

    while i was receiving "success" from calls to http://elgg.domain.org/rewrite.php, checking response from curl in runRewriteTest function (ElggRewriteTester.php[82]) it was 404!

    what??

    aha, adding entry xxx.xxx.xxx.xxx elgg.domain.org to my /etc/hosts solved the issue!!

    hope this helps.

     

    Alberto.

  • Strangely, I found that having Basic authentication (a user/pass curtain) set up on the site prevented the rewrite check from working. Surely there's a better way to test than actually making an HTTP request? Or, if that has to be done, allow the user to provide the username and password. I suppose this isn't the place for this suggestion...I'm new so not sure where that is! :)

  • finally, i found the correct solution:

    make sure you first enable mod_rewrite by using the following command:

    sudo a2enmod rewrite

    After enabling mod_rewrite


    change AllowOverRide None in /etc/apache/sites-available/default to AllowOverRide All. Apache won’t read the rewrite rules nor the .htaccess-files if AllowOverRide is set to None.