The MU forums have moved to WordPress.org

wp-signup.php permanent redirect (13 posts)

  1. atddta
    Member
    Posted 17 years ago #

    I have installed WPMU in localhost:8080/blogs/, installation worked fine.

    When pointing to localhost:8080/blogs/, i get a redirect loop to wp-signup.php, because of this statement (line 9)


    if( $current_blog->domain != $current_site->domain ) {
    header( "Location: http://" . $current_site->domain . $current_site->path . "wp-signup.php" );
    die();
    }

    because $current_blog->domain == ""

    My wp-config.php includes:

    define('VHOST', 'no');
    $base = '/blogs/';

  2. mozey
    Member
    Posted 17 years ago #

    there seem to be few people having this issue. check out "redirect" the tag.

  3. atddta
    Member
    Posted 17 years ago #

    I certainly checked out that, but I couldn't find anything useful.

    Can anyone point out where $current_blog is set? I think it is the responsible for the loop.

  4. andrea_r
    Moderator
    Posted 17 years ago #

    I think it's more because your location is set to "http://" and not "http://localhost:8080/blogs/"

  5. atddta
    Member
    Posted 17 years ago #

    Sorry? Could you be more specific? What "location" are you talking about?

    In DB:
    wp_site->domain = localhost:8080
    wp_site->path = /blogs/
    wp_blogs->domain = localhost:8080
    wp_blogs->path = /blogs/
    wp_1_options->siteurl = http://localhost:8080/blogs/
    wp_users->user_url = http://localhost:8080/blogs/

    In .htaccess
    RewriteBase /blogs/

    Relevant wp-config.php info is provided above

  6. atddta
    Member
    Posted 17 years ago #

    Hi, I've found the bug.

    In wpmu-settings.php, line 10:

    $domain = preg_replace('/:.*$/', '', $domain); // Strip ports

    But, as you can see above, the domain is stored in the database WITH the port information. So the SQL query in line 70 for VHOST == yes, or queries in lines 84-85 for VHOST == no don't match the domain stored in the database.

    Commenting wpmu-settings.php, line 10 breaks the loop.

  7. atddta
    Member
    Posted 17 years ago #

    This last change breaks wp_setcookie, because COOKIE_DOMAIN includes the port.
    You have to change wp-settings.php, line 247 to:

    define('COOKIE_DOMAIN', '.' . preg_replace('/:.*$/', '', $current_site->domain));

  8. frayquantum
    Member
    Posted 17 years ago #

    thanks very much, this happened on our mac OSX server, and this fix it very nicely,

    thank You :)

  9. TomK32
    Member
    Posted 17 years ago #

    I just stumbled across the same but I guess comenting it out is nicer for the simple reason that if someone signs up for a account to add a comment or something (not like getting a blog) should be kept in the blog he came from.

  10. TomK32
    Member
    Posted 17 years ago #

    BTW, the bug in wpmu-settings.php:9 is still existing :-/

  11. andrea_r
    Moderator
    Posted 17 years ago #

    atddta: the location I'm talking about is your blog's location - the field you filled in on install. There's no reason to hack anything, it's not made to work with alternate ports, and not in the format of localhost:8080 either.

    The :8080 didn't get in the db by itself; you had to have typed it in somewhere. Usually on install, because you;re not supposed to touch the config file before you install anything.

    If you're setting up on a localhost, you absolutely must use the format localhost.something or even something.local or whatever. It can't be just lcoalhost, and it can't have a port on it. End of story.

  12. mirabellis
    Member
    Posted 15 years ago #

    er... not sure this is end of story... I setup websites through ssh tunnels, so I redirect localhost:8080 to webservers across the ssh tunnel (ssh -L 8080:internal_hostname:80). However, wordpress takes the localhost:8080 to heart and access from *inside* (the other side of the tunnel) is not working because wordpress returns the localhost:8080 URL to all internal clients... And when I fix it, then I cannot access from outside because wordpress returns to me an intranet URL valid only inside the firewall.

    I guess I am missing something, perhaps I should look into URL re-write on the apache server. This is a very annoying problem since I cannot access my clients' sites with simple port redirection in ssh. With drupal, this has never been a problem.

  13. lunabyte
    Member
    Posted 15 years ago #

    You say: "WordPress".

    I say: http://wordpress.org/support/ for their support. :)

About this Topic