Skip to:
Content
Pages
Categories
Search
Top
Bottom

Infinite Loops on posts and profiles with IIS


  • 737705
    Inactive

    Hi there,

    I’ve been using bbpress for a while but I recently updated my servers and switched all the sites over to it. Much to my frustration I am experiencing infinite loops when attempting to edit or view any profiles or topics. Thus making a rather rubbish forum!

    Admin pages work fine, WP integration went through perfectly, topics can be posted BUT not viewed.

    Right so heres the spec:

    Windows Server 2008

    IIS7

    PHP 5.2.6

    MySQL 5.1.25

    Both the latest versions of WP and BBpress, WP is installed absolutely fine.

    With debug activated I get the following:

    REQUEST_URI: string(31) “/journal/messageboard/topic.php”

    should be: string(37) “/journal/messageboard/topic.php?id=39”

    full permalink: string(64) “http://www.XXXXX.com/journal/messageboard/topic.php?id=39”

    PATH_INFO: NULL

    If anyone can help me out I would actually love them a great, great deal…..

    I found this thread, which is quite old:

    http://comox.textdrive.com/pipermail/bbdev/2005-July/000206.html

    But the fixes suggested there are in the settings file already.

    Help would be appreciated and thanks in advance

    M.A

Viewing 20 replies - 1 through 20 (of 20 total)

  • chrishajer
    Participant

    @chrishajer

    Can you post a link to your forum so we can see what’s happening?


    737705
    Inactive

    737705
    Inactive

    I don’t suppose anyone has had a chance to check that link? I might have to take the forum down on it soon as I’m concerned about a infinite loop being live on the server.

    I’ve been researching and can’t seem to find a solution to this….

    It just seems odd as on IIS6 Bbpress worked fine…..


    chrishajer
    Participant

    @chrishajer

    I don’t get an infinite loop, but everything I clicked on in the message board resulted in a 404 error. Did you change something?


    737705
    Inactive

    Ha, yeah I switched it over to make it stop looping to save bandwidth….Just before you messaged rather typically….

    I will set it going now and will leave it live for the day.

    If someone could have a look that would be awesome.

    Thanks


    chrishajer
    Participant

    @chrishajer

    Wow, that most certainly is a problem.

    Two thoughts.

    1. If I disable “meta redirects” in FF with the web developer toolbar, it does not keep redirecting, it just dies. Are you trying to redirect people from the bbPress profile page to the WordPress profile page, and somehow that is typed wrong? Like in journal/messageboard/profile.php there is a redirect that sends the browser to WordPress journal/wp-admin/profile.php and it’s not working for some reason?

    2. There is some weird test cookie stuff being sent, although I doubt it has any effect on this problem. Never know though.

    wordpress_test_cookie
    WP+Cookie+check
    www.louisecooper.com
    /journal/

     

    I suspect it’s something with a refresh bouncing the user back and forth.


    737705
    Inactive

    Well the plot thickens…..

    I had a look at your suggestions and there doesn’t appear to be anything inputted wrong.

    So as an experiment I did a clean install of bbpress on my server with no mention of a WP integration and a clean database and exactly the same thing happens…..

    Any ideas what I can try to stop this? This is pretty weird….

    Is it possible to download older versions of Bbpress to test those….?


    chrishajer
    Participant

    @chrishajer

    Older versions are available. Pick your release from here:

    https://trac.bbpress.org/browser/tags


    chrishajer
    Participant

    @chrishajer

    What is the equivalent of mod_rewrite on IIS? I mean, what makes the URLs into permalinks rather than just topic.php?id=whatever?


    737705
    Inactive

    Mod_rewrite doesn’t work on IIS without third party software and I think they are all a little buggy on IIS7.

    Annoying but true, so this is just using Bbpress with the normal query string setting.

    I will try an older version of bbpress later today just to see what happens.


    737705
    Inactive

    Oh yeah also, this problem never occurred on server 2003 which has what flummoxed me about this….


    chrishajer
    Participant

    @chrishajer

    But it *isn’t* just using the normal query strings, I don’t think. They looked like permalinks to me. Did you set the permalinks to true or slugs?

    Here are some URLs I saw yesterday:

    http://www.louisecooper.com/journal/messageboard/topic/louise-cooper-fanart

    http://www.louisecooper.com/journal/messageboard/topic/possible-site-downtime

    http://www.louisecooper.com/journal/messageboard/tags/louise

    http://www.louisecooper.com/journal/messageboard/profile/chrishajer

    Those look like permalinks to me. I think they all gave a 404 error. You said you “switched it over” earlier, to keep it from looping. What did you mean by that?


    737705
    Inactive

    Hi Chris,

    Appreciating your continued interest in this.

    By “switched it over” I meant on the setting for Pretty permalink type:

    The normal way to get this working in IIS is ‘none’ as it doesn’t like url rewrites, so when I switched it over I meant I temporarily turned the setting to ‘Name based’ purely to stop visitors setting the forum into an infinite loop and using a ton of bandwidth as this goes straight to a 404 page not a loop

    So the loop occurs when the permalinks are set to ‘None” as can be seen here:

    http://www.louisecooper.com/journal/messageboard/topic.php?id=38

    That is the query string format that normally works in IIS.

    As for setting the permalinks to true or slugs specifically I’m not sure how to do that.

    But I am not using the pretty permalinks normally, I only had it set to that when you visited yesterday so that my bandwidth wasn’t wasted.

    That make sense?

    Hope so…..

    So if you visit right now:

    http://www.louisecooper.com/journal/messageboard/index.php

    It is set as it should be, complete with loops on topics….


    chrishajer
    Participant

    @chrishajer

    I see :-) So you turn on permalinks to prevent people from viewing anything and putting their request into an infinite loop. Got it.

    I see now that it’s still broken. Are you sure there is nothing causing a meta redirect? The only thing that stops the looping for me is to disable meta redirects in my browser. Other than that, it loops forever.


    737705
    Inactive

    Yeah I’ve tried what you’ve tried there with the re-directs and yep, it just dies.

    But no meta-redirects are used in my sites at all. For experimentation I tried the domain with two different domain bindings, multiple domain bindings. But no difference.

    I tried an older version of bbpress, same problem. I installed bbpress fresh into a different domain, same problem.

    I noticed this guy here had a similar prob a while back:

    Forum and topic pages redirects to page 1

    But never said how he solved it, I might join up to his forum and ask him….

    But yes this is driving me crazy…on a plus note when I finally fix it I can fresh install bbpress in about two minutes ;-)

    Any other suggestions from folk greatly appreciated. And thanks for ongoing help Chris.


    chrishajer
    Participant

    @chrishajer

    How about IIS access logs or error logs?


    _ck_
    Participant

    @_ck_

    I’m taking a look at this now for what it’s worth.

    Not sure if I’ll be able to help but let’s see.

    IIS is sending a refresh header:

    Refresh 0;url=http://www.louisecooper.com/journal/messageboard/topic.php?id=20

    content length is zero, so nothing is being sent

    Apparently IIS returns “request_uri” differently than other servers. I suspect it’s a similar problem to what they went through with drupal here: http://drupal.org/node/166095

    Unfortunately it’s way over my head to fix. I suspect it will take someone like MDA to fix it.


    _ck_
    Participant

    @_ck_

    I have a crazy idea to try to “fake out” bbPress and make it think request_uri actually exists on the IIS server so it doesn’t try to (incorrectly) calculate it itself.

    Try saving and installing this as a plugin with a leading underscore, ie. _IIS-fix.php

    <?php
    /*
    Plugin Name: IIS request_uri fix
    */
    if (isset($_SERVER['HTTP_REQUEST_URI'])){
    $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];
    }
    else{
    if(isset($_SERVER['SCRIPT_NAME']))
    $_SERVER['HTTP_REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
    else
    $_SERVER['HTTP_REQUEST_URI'] = $_SERVER['PHP_SELF'];
    if($_SERVER['QUERY_STRING']){
    $_SERVER['HTTP_REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
    }
    $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];
    }
    ?>

    no activation required, should auto-activate – just delete if it causes problems


    737705
    Inactive

    You sir, are an absolute GENIUS!

    It works!

    I cannot thank you enough, thanks very much.

    Just to confirm that this is only need for IIS7 as IIS6 works just fine with Bbpress.

    Seriously, thank you _ck_ I owe you a drink or something!

    M


    chrishajer
    Participant

    @chrishajer

    Awesome _ck_ – thank you.

Viewing 20 replies - 1 through 20 (of 20 total)
  • You must be logged in to reply to this topic.
Skip to toolbar