Is this a bug? Installer on IIS7 redirect loop on index.php

You found a bug or you're missing a major feature? Just ask and discuss
Forum rules
We use this forum to discuss about bugs and feature requests. If you are sure you found a bug or have a good feature request: Don't hesitate and use our github issue tracker at https://github.com/owncloud/core/issues

Is this a bug? Installer on IIS7 redirect loop on index.php

Postby Raybot » Tue Apr 17, 2012 12:57 am

Hi all!

I just installed Owncloud 3.0.2 on a Windows 7 box, following the instructions on http://owncloud.org/support/setup-and-i ... ws-server/ . Everything went fine up until I tried to open http://localhost/owncloud/ (which should load index.php) - at that point I get the "The page isn't redirecting properly" error from Firefox. It appeared that index.php kept redirecting to itself.

I got as far as the following statement in lib/base.php:

Code: Select all
      if (!OC_Config::getValue('installed', false) && OC::$SUBURI != '/index.php') {
         $url = 'http://'.$_SERVER['SERVER_NAME'].OC::$WEBROOT.'/index.php';
         header("Location: $url");
         exit();
      }


Now my PHP is very rusty so I haven't been able to figure out exactly what is wrong with this (or what is wrong with my setup that is causing this to not realise it's already executing index.php) but if I comment this block out (or otherwise stop the IF statement from executing) everything works, I can install and it's now all working.

Before I file a bug report though I just wanted to run it past here and see if anyone else is having this problem (or has any thoughts on this).
Raybot
Newbie
 
Posts: 5
Joined: Mon Apr 16, 2012 11:50 pm

Re: Is this a bug? Installer on IIS7 redirect loop on index.

Postby jayuk20 » Tue Apr 17, 2012 9:30 am

How do I comment out or stop if statement, I don't know about php
jayuk20
Newbie
 
Posts: 2
Joined: Mon Apr 16, 2012 11:53 pm

Re: Is this a bug? Installer on IIS7 redirect loop on index.

Postby tofuSCHNITZEL » Thu Apr 26, 2012 10:29 pm

Same problem here. also with IIS and also with wamp server. I did not try to comment something out as this should not happen out of the box! Problem persists also with dev. version.
tofuSCHNITZEL
Newbie
 
Posts: 1
Joined: Thu Apr 26, 2012 6:20 pm

Re: Is this a bug? Installer on IIS7 redirect loop on index.

Postby zbrown » Fri Apr 27, 2012 1:58 am

Same problem here - would love the solution if anyone has any ideas.
zbrown
Newbie
 
Posts: 5
Joined: Fri Apr 27, 2012 1:57 am

Re: Is this a bug? Installer on IIS7 redirect loop on index.

Postby Raybot » Fri Apr 27, 2012 2:47 am

If by "solution" you mean something that'll make it work, as I mentioned in the first post you just comment that block out.

If by "solution" you mean figure out why that block of code isn't doing what the writer intended, well, I guess that'd involve a little more than what I can offer. ;-)
Raybot
Newbie
 
Posts: 5
Joined: Mon Apr 16, 2012 11:50 pm

Re: Is this a bug? Installer on IIS7 redirect loop on index.

Postby zbrown » Fri Apr 27, 2012 3:33 am

Found another report that suggested replacing "false" with "true" in that code and it worked for me. Why this doesn't work right out of the box, I do not know - I get the feeling I'm not done with the problems yet.
zbrown
Newbie
 
Posts: 5
Joined: Fri Apr 27, 2012 1:57 am

Re: Is this a bug? Installer on IIS7 redirect loop on index.

Postby blanik » Fri Jun 08, 2012 10:40 am

Same problem with 4.0.1 on windows box with xampp. Changed to true as suggested on another thread.

Now need to upgrade PHP from 5.2.5 to carry on testing.
blanik
Newbie
 
Posts: 1
Joined: Fri Jun 08, 2012 10:28 am

Re: Is this a bug? Installer on IIS7 redirect loop on index.

Postby drhirn » Sat Jun 09, 2012 10:34 am

Problem with the endless redirects is described here: http://forum.owncloud.org/viewtopic.php?f=3&t=2370
It's because of the slash. Windows needs a backslash.
So change
Code: Select all
if (!OC_Config::getValue('installed', false) && OC::$SUBURI != '/index.php') {

to
Code: Select all
if (!OC_Config::getValue('installed', false) && OC::$SUBURI != DIRECTORY.SEPARATOR.'index.php') {
.
This is working with Linux and Windows
drhirn
Starter
 
Posts: 92
Joined: Wed Apr 25, 2012 11:50 am


Return to Discuss possible bugs & feature requests

Who is online

Users browsing this forum: No registered users and 4 guests