The MU forums have moved to WordPress.org

Log In impossible after wordpress mu installation modified to force www (4 posts)

  1. Cherubin13
    Member
    Posted 14 years ago #

    Hello All,

    Please, don't speak about the www is depreceated or not, the question is other.

    i would like to have a wordpress mu install with /subdirectory, and force the "www".

    I modify wpmu-settings.php l 9-10 :

    //if( substr( $domain, 0, 4 ) == 'www.' )
    //	$domain = substr( $domain, 4 );

    file index-install.php :

    l 366-367

    //if( substr( $_SERVER[ 'HTTP_HOST' ], 0, 4 ) == 'www.' )
    	//	$hostname = str_replace( "www.", "", $_SERVER[ 'HTTP_HOST' ] );

    l 515-516

    //if( substr( $domain, 0, 4 ) == 'www.' )
    	//	$domain = substr( $domain, 4 );

    l 653-678

    /*function nowww() {
    	$nowww = str_replace( 'www.', '', $_POST[ 'basedomain' ] );
    	?>
    	<h2>No-www</h2>
    	<p>WordPress &micro; strips the string "www" from the URLs of sites using this software. It is still possible to visit your site using the "www" prefix with an address like <em><?php echo $_POST[ 'basedomain' ] ?></em> but any links will not have the "www" prefix. They will instead point at <?php echo $nowww ?>.</p>
    	<p>The preferred method of hosting blogs is without the "www" prefix as it's more compact and simple.</p>
    	<p>You can still use "<?php echo $_POST[ 'basedomain' ] ?>" and URLs like "www.blog1.<?php echo $nowww; ?>" to address your site and blogs after installation but internal links will use the <?php echo $nowww ?> format.</p>
    
    	<p><a href="http://no-www.org/">www. is depreciated</a> has a lot more information on why 'www.' isn't needed any more.</p>
    	<p>
    		<form method='post'>
    			<input type='hidden' name='dbname' value='<?php echo $_POST[ 'dbname' ]; ?>' />
    			<input type='hidden' name='uname' value='<?php echo $_POST[ 'uname' ]; ?>' />
    			<input type='hidden' name='pwd' value='<?php echo $_POST[ 'pwd' ]; ?>' />
    			<input type='hidden' name='dbhost' value='<?php echo $_POST[ 'dbhost' ]; ?>' />
    			<input type='hidden' name='vhost' value='<?php echo $_POST[ 'vhost' ]; ?>' />
    			<input type='hidden' name='weblog_title' value='<?php echo $_POST[ 'weblog_title' ]; ?>' />
    			<input type='hidden' name='email' value='<?php echo $_POST[ 'email' ]; ?>' />
    			<input type='hidden' name='action' value='step2' />
    			<input type='hidden' name='basedomain' value='<?echo $nowww ?>' />
    			<input class="button" type='submit' value='Continue' />
    		</form>
    	</p>
    	<?php
    }
    */

    l 683-687

    //if( substr( $_POST[ 'basedomain' ], 0, 4 ) == 'www.' ) {
    		//	printheader();
    		//	nowww();
    		//	continue;
    		//}

    l 696
    //$_SERVER[ 'HTTP_HOST' ] = str_replace( 'www.', '', $_SERVER[ 'HTTP_HOST' ] ); // normalise hostname - no www.

    the installation works correctly, but when i try to connect me to the admin/login, it's impossible. Sytem tell me to try...
    I ask for a new password, by the link "password forgotten" but i don't received email...
    And i know it isn't my server configuration because for other domain, i received emails, and the fonction php mail() works.

    So, i don't understand the problem... could you help me please?

    Regards,

    El Cherubin

  2. Cherubin13
    Member
    Posted 14 years ago #

    no idea?! :(

  3. cafespain
    Member
    Posted 14 years ago #

    I don't think many (any) people have hacked the install that much to have come across the problem.

    You could try going into the database and manually changing your password.

    Check the spam folder on your email account for the forgotten password email.

    Add a new user, to see if you can log in as them. If so go into the db and add them as a site admin user, and use that account to reset the main admin one.

    Check you've got your Cookie domain define set up correctly.

  4. jhelvoort
    Member
    Posted 14 years ago #

    Hi El Cherubin,

    I found myself in the exact same situation ( using wpmu 2.9.1.1 ) and came up with this :

    Please try this ,

    add a line to your wp-config.php file mentioning the COOKIE_DOMAIN without the "www".

    define('COOKIE_DOMAIN', 'example.net' );

    I was able to login to my admin console after doing so.
    The scary thing about it is, that this shows that there are more places where the installation / configuration should be adjusted.

    Kind Regards,
    John

About this Topic

  • Started 14 years ago by Cherubin13
  • Latest reply from jhelvoort