[ phpwiki-Bugs-1420752 ] Problem with Request-->redirect

"SourceForge.net" <[email protected]> Tue, 31 Jan 2006 09:37:35 -0800
Newsgroups gmane.comp.web.wiki.phpwiki.bugs
Message-ID <[email protected]>
Bugs item #1420752, was opened at 2006-01-31 18:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106121&aid=1420752&group_id=6121

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: version 1.3.x (experimental)
Group: PHP error
Status: Open
Resolution: None
Priority: 5
Submitted By: Thierry Nabeth (nabeth)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem with Request-->redirect

Initial Comment:
Hello,

As I moved from a Windows 2000 to a Windows 2003 
server, I got some problem with the redirect function.

I am running PhpWiki under IIS6.
 (things are working relatively well if we except 
this problem, and a logout problem that I mentionned 
previously).

I use the latest version of PHP 5.  (5.12 I believe).

Here is the problem I have:

I have 
DISABLE_HTTP_REDIRECT set to true.

(when I set DISABLE_HTTP_REDIRECT to false the system 
works).

When I update a page, and after I click on the Save 
button, the system never returns.
When I stop the browser and look at the page, I can 
see that my page has been correctly updated.


I spent sometime trying to figure out what was the 
problem (Initially I though about a bug with IIS6 and 
the http redirect, but other tests have shown me that 
http redirect work).

The problem seems to originate in Request.php

function redirect($url, $noreturn = true) {
    $bogus = defined('DISABLE_HTTP_REDIRECT') && 
DISABLE_HTTP_REDIRECT;

if (!$bogus) {
    header("Location: $url");
    ....
}

if ($noreturn) {
     $this->discardOutput(); // This might print the 
gzip headers. Not good.
     $this->buffer_output(false);

     include_once('lib/Template.php');
     $tmpl = new Template('redirect', $this, array
('REDIRECT_URL' => $url));
     $tmpl->printXML();  ===>  #### BLOCKED ####

     $this->finish();  ==> not executed ????
}
 ...

}


As a workaround, I have commented the $tmpl->printXML
();.

I do not know what this redirect template is about.
(could be good to have a few more comments in the 
code)


Thierry.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106121&aid=1420752&group_id=6121


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642