[dokuwiki] Re: Dokuwiki farm question

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 22 Oct 2009 18:02:35 +0100


On 22 Oct 2009, at 16:58, Karl Loncarek wrote:


Take a look at the login code, also see dokuwiki xref pages, 
http://dev.splitbrain.org/reference/dokuwiki/

Just this once, iirc, auth_login() -> act_redirect() -> act_redirect_execute() -> send_redirect() are called to forward the user to the wiki home page.

If you do find a bug, please visit http://bugs.splitbrain.org and file a bug report, include your proposed solution if you have one.

- Chris
Ok found the problematic point so far: In common.php ther is a function send_redirect() which uses
header('Location: '.$url);
for redirecting. It seems that this sort of redirection interferes with the internal server redirection.

It shouldn't.

One moment. Am I wrong when I say that: internal redirection works on the web servers side and Header-redirection works in the browser? This would explain the behaviour. I assume that the browser takes the actual path of the website and simply tries to add (in my case: "../doku1/doku.php"). Seems like "../" does not work here and is ignored.

Header redirection, tells your browser the page can be found somewhere else and it sends a new request to the new location. This is the same as if the browser had requested the new url in the first place. What you call "internal redirection" is url rewriting and normally it happens internal to the webserver.

Do you think I'm correct here?

As I looked at the string $url in the send_redirect function I saw it's a filename with an absolute path. In order to work also in farms it should look like e.g. "http://127.0.0.1/dokuwiki/doku.php ", right?

Just for fun I hardcoded the above sampel URL and then it worked without flawlessly.

Is this a bug? What do you think?

Insufficient information. After a successful login, dokuwiki redirects you to the start page (or maybe the same page you were on when you pressed the login button). It should generate the url for that page in the same way it normally generates internal urls - excepting that this url should always be an absolute url. If that url is being generated incorrectly, it could be a bug or it could be that your configuration isn't set correctly.


Tomorrow I'll search whether I can found out where this absolute path comes from.

- Karl
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: