Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Installing 0.8.16100 - Redirect loop issue
 
BradF73
Jr. Member
 
Total Posts:  7
Joined:  2008-02-20
 

Hi all,

I’ve been struggling with this for over a week now, and my brain hurts. smile I’ve reviewed threads with similar problems, tried all the fixes, read through pages of Magento code, etc, etc and can’t seem to get the Install screen to appear. Here’s what’s happening:

Installed at: http://www.logikwerx.com/magento

Accessing that URL puts you into an infinite re-direct loop. It appears to be redirecting to: http://www.logikwerx.com/magento/index.php/install

I’m using Firefox; eventually it gives up and displays the “Firefox has detected that the server is redirecting the request for this address in a way that will never complete” error message.

I’ve gone back to a completely new installation and am ready to try any suggestions. I am on a VPS with Gate.com. PHPInfo can be seen here: http://www.logikwerx.com/magento/info.php.

Here is some of the output from the RewriteLog:

------------------------------------------------
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] strip per-dir prefix: /var/www/vhosts/logikwerx.com/httpdocs/magento/ ->
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] applying pattern ‘.*’ to uri ‘’
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (5) setting env variable ‘HTTP_AUTHORIZATION’ to ‘’
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] strip per-dir prefix: /var/www/vhosts/logikwerx.com/httpdocs/magento/ ->
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] applying pattern ‘.*’ to uri ‘’
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (4) RewriteCond: input=’/magento/’ pattern=’!^/(media|skin|js)/’ => matched
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (4) RewriteCond: input=’/var/www/vhosts/logikwerx.com/httpdocs/magento/’ pattern=’!-f’ => matched
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (4) RewriteCond: input=’/var/www/vhosts/logikwerx.com/httpdocs/magento/’ pattern=’!-d’ => not-matched
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a3208a8/initial] (1) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] pass through /var/www/vhosts/logikwerx.com/httpdocs/magento/
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] add path info postfix: /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php -> /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php/install/
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] strip per-dir prefix: /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php/install/ -> index.php/install/
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] applying pattern ‘.*’ to uri ‘index.php/install/’
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (5) setting env variable ‘HTTP_AUTHORIZATION’ to ‘’
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] add path info postfix: /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php -> /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php/install/
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] strip per-dir prefix: /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php/install/ -> index.php/install/
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] applying pattern ‘.*’ to uri ‘index.php/install/’
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (4) RewriteCond: input=’/magento/index.php/install/’ pattern=’!^/(media|skin|js)/’ => matched
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (4) RewriteCond: input=’/var/www/vhosts/logikwerx.com/httpdocs/magento/index.php’ pattern=’!-f’ => not-matched
170.22.76.10 - - [20/Feb/2008:12:04:29 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (1) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] pass through /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php
170.22.76.10 - - [20/Feb/2008:12:04:30 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] add path info postfix: /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php -> /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php/install/
170.22.76.10 - - [20/Feb/2008:12:04:30 --0500] [www.logikwerx.com/sid#a07afb0][rid#a32ef18/initial] (3) [per-dir /var/www/vhosts/logikwerx.com/httpdocs/magento/] strip per-dir prefix: /var/www/vhosts/logikwerx.com/httpdocs/magento/index.php/install/ -> index.php/install/
------------------------------------------------------------------

It keeps repeating beyond that....

Any assistance is very much appreciated.

Thanks,
-Brad

 
Magento Community Magento Community
Magento Community
Magento Community
 
Airforce111
Sr. Member
 
Avatar
Total Posts:  100
Joined:  2008-01-31
 

This is probably not the answer, but does your php environment have the mcrypt extension installed?

 
Magento Community Magento Community
Magento Community
Magento Community
 
BradF73
Jr. Member
 
Total Posts:  7
Joined:  2008-02-20
 

Hmm, no, it doesn’t appear to have mcrypt installed. Thought I had double-checked all of the requirements, but I guess I missed that one. I can work on getting that installed next, although this really seems to be some sort of Apache / mod_rewrite issue.

Thanks,
-Brad

 
Magento Community Magento Community
Magento Community
Magento Community
 
BradF73
Jr. Member
 
Total Posts:  7
Joined:  2008-02-20
 

ok, mcrypt installed… No difference. :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
Airforce111
Sr. Member
 
Avatar
Total Posts:  100
Joined:  2008-01-31
 

How do you have your directories set up on your server?
From the url, it seems you installed /magento into your web root, so it should be http://logikwerx.com/magento

However, accessing that re-routes you to: http://logikwerx.com/httpdocs/magento/index.php/install/
I’m thinking that /httpdocs/ shouldn’t be there.

What’s your .htaccess file within your magento folder look like? Does it have:
RewriteBase /magento/

 
Magento Community Magento Community
Magento Community
Magento Community
 
BradF73
Jr. Member
 
Total Posts:  7
Joined:  2008-02-20
 

The full filesystem path to my site is /var/www/vhosts/logikwerx.com/httpdocs. Magento is installed in /var/www/vhosts/logikwerx.com/httpdocs.

The URL that I end up being re-directed to endlessly is http://www.logikwerx.com/magento/index.php/install

It seems that this is what happens:

I type http://www.logikwerx.com/magento

The server executes the ‘index.php’ in this directory.

index.php calls Mage.php

Mage.php, on line 401:
header(’Location:’.self::getUrl(’install’));

This “should” (I think) redirect to http://www.logikwerx.com/magento/install —at which point the mod_rewrite rules would work their magic, re-writing the URL to index.php, and processing of the rest of the URI could then occur. I could be mistaken on how this process is supposed to work, however.

But what seems to be happening is that self::getUrl(’install’) is somehow including ‘index.php’ in the ‘base url’, so it ends up issuing a re-direct to http://www.logikwerx/magento/index.php/install and when this hits the re-write rules, something gets screwy to where the same re-direct continues to be issued.

As for .htaccess—I have tried both with no RewriteBase specificed and with “RewriteBase /magento/” with the same result.

Thanks for your help…

-Brad

 
Magento Community Magento Community
Magento Community
Magento Community
 
redb
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-02-15
Savoie, France
 

hello

I have the same problem. Everything goes on my local MAMP install, on my shared server but not on my fedora 4 /plesk 8.3 server
THE SOLUTION IS : set your root htaccess permissions (in the same folder as your magento index page) to 664 (in place of 644)

It’s working for me, even i have this new message in the head of my install page :
Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /var/www…
but thid is only than you have turn your safe mod to off wink

regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
brandondrew
Member
 
Avatar
Total Posts:  64
Joined:  2007-09-12
 

That solution (chmod 664 .htaccess) didn’t help me. 

I have magento installed in my server’s document root.  (so the URL is store.domain.com, rather than store.domain.com/magento) and I updated the .htaccess file to reflect this.  (The problem was the same before AND after making that update, though, so I didn’t introduce the problem by changing my RewriteBase to /)

I did a fresh installation of 1.0, with a fresh database.  I have no idea what could be the problem....  does anyone else have any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mayerwin
Sr. Member
 
Avatar
Total Posts:  182
Joined:  2008-01-15
France
 

Try reading the reports in /var/report/. This can be of some help. I had also a redirect loop problem and finally I found out that it was because all the tables log_* had been removed from the database, I don’t know how!
So I just added them again and if worked fine again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brandondrew
Member
 
Avatar
Total Posts:  64
Joined:  2007-09-12
 

Yeah, I eventually solved this, but I don’t recall now what the problem turned out to be…

 
Magento Community Magento Community
Magento Community
Magento Community
 
fitabo.com
Jr. Member
 
Total Posts:  5
Joined:  2008-07-08
 

Same problem here… trying to install latest magento on my all-inkl (german hoster / magento-check.php says all settings ok) webspace and the installer puts you into an infinite re-direct loop and adds every second index.php/install to the url.

Local installation works but magento is just tooo buggy (no product image upload etc) ... real nice software but with the bugs and all the whitepages and 500er etc just unusable!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
romanceculture
Jr. Member
 
Total Posts:  5
Joined:  2008-07-30
 

Is there a solution to it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Alexander Ch
Jr. Member
 
Total Posts:  1
Joined:  2009-10-05
 

I have this errors on instalation - redirection loop.

I debug code and i find this:
If your magento is not installed and you have any php errors (ex. session start error) in Mage::run
Alvays executes next code

catch (Exception $e{
            
if (self::isInstalled() || self::$_isDownloader{
                self
::printException($e);
                exit();
            
}
            
try {
                self
::dispatchEvent('mage_run_exception', array('exception' => $e));
                if (!
headers_sent()) {
                    header
('Location:' self::getUrl('install'));
                
else {
                    self
::printException($e);
                
}
            } 
catch (Exception $ne{
                self
::printException($ne$e->getMessage());
            
}
}

Add debug

catch (Exception $e{
        print_r
($e)
and correct your errors.
 
Magento Community Magento Community
Magento Community
Magento Community
 
SpeedBird
Sr. Member
 
Total Posts:  85
Joined:  2009-12-03
 

I had an ‘infinite redirect’ issue following a RAM (hardware) failure.

Running a repair operation on all tables in Magento’s database resolved the issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ahmatti
Jr. Member
 
Total Posts:  4
Joined:  2009-10-27
 
BradF73 - 21 February 2008 02:51 AM

The full filesystem path to my site is /var/www/vhosts/logikwerx.com/httpdocs. Magento is installed in /var/www/vhosts/logikwerx.com/httpdocs.

The URL that I end up being re-directed to endlessly is http://www.logikwerx.com/magento/index.php/install

It seems that this is what happens:

I type http://www.logikwerx.com/magento

The server executes the ‘index.php’ in this directory.

index.php calls Mage.php

Mage.php, on line 401:
header(’Location:’.self::getUrl(’install’));

This “should” (I think) redirect to http://www.logikwerx.com/magento/install —at which point the mod_rewrite rules would work their magic, re-writing the URL to index.php, and processing of the rest of the URI could then occur. I could be mistaken on how this process is supposed to work, however.

But what seems to be happening is that self::getUrl(’install’) is somehow including ‘index.php’ in the ‘base url’, so it ends up issuing a re-direct to http://www.logikwerx/magento/index.php/install and when this hits the re-write rules, something gets screwy to where the same re-direct continues to be issued.

As for .htaccess—I have tried both with no RewriteBase specificed and with “RewriteBase /magento/” with the same result.

Thanks for your help…

-Brad

Hi,
I have the exact same problem.
This only happens with Magento 1.4. The version 1.3.x installs without problems.

Server error logs are clean - only the redirect loop appears in the logs.

Any solution on this?

-E

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top