Initial Problems: Multisite malfunctions

Domain Mapping seems to be nonfunctional. Though it is showing up as installed, when I enter a redirect from the following it does not work, it instead brings up a blank page from my hosting provider.

Custom Domain http://laudanumonline.com/
Original URL http://www.entropianetwork.com/laudanum/

Also I am unable to get Multi-Domains to work at all. It is not showing up in installed products despite being present in the proper wp-content/plugins directory, and despite having sunrise.php moved to the proper directory with the proper code entered into wp-config.php

I am overall concerned that my mutisite install is not set up properly.

I have the following plugins currently active on my wordpress multisite

Domain Mapping plugin
Multisite Privacy
Networks for WordPress
No Comments On Pages
No Right Click Images Plugin
Simple:stuck_out_tongue:ress
WPMU DEV Dashboard

Multisite is working, in that I have multiple websites up and functioning on the entropianetwork.com base domain. However this was done with the Networks for Wordpress Plugin months ago. I am attempting to use these tools to refine the wordpress experience and bring it to multiple users.

Thanks for any assistance!

  • edward_stanaway

    The sunrise.php file I have in wp-content reads as follows:

    <?php
    
    if ( defined( 'COOKIE_DOMAIN' ) )
    	die( 'The constant "COOKIE_DOMAIN" is defined (probably in wp-config.php). Please remove or comment out that define() line.' );
    
    // Compatibility mode
    define('DM_COMPATIBILITY', 'yes');
    
    // domain mapping plugin to handle VHOST and non VHOST installation
    global $wpdb;
    
    // No if statement needed as the code was the same for both VHOST and non VHOST installations
    if(defined('DM_COMPATIBILITY')) {
    	$wpdb->dmtable = $wpdb->base_prefix . 'domain_mapping';
    } else {
    	$wpdb->dmtable = $wpdb->base_prefix . 'domain_map';
    }
    
    $wpdb->suppress_errors();
    
    $using_domain = $wpdb->escape( preg_replace( "/^www\./", "", $_SERVER[ 'HTTP_HOST' ] ) );
    
    $mapped_id = $wpdb->get_var( "SELECT blog_id FROM {$wpdb->dmtable} WHERE domain = '{$using_domain}' LIMIT 1 /* domain mapping */" );
    
    $wpdb->suppress_errors( false );
    
    if ( !$mapped_id && ( preg_replace( "/^www\./", "", DOMAIN_CURRENT_SITE ) !== $using_domain ) ) {
    	$md_domains = unserialize( $wpdb->get_var( "SELECT meta_value FROM {$wpdb->sitemeta} WHERE meta_key = 'md_domains' AND site_id = 1" ) );
    
    	if( $_SERVER['REQUEST_URI'] == '/' ) {
    		foreach ( $md_domains as $domain ) {
    
    			if( $_SERVER['HTTP_HOST'] == strtolower( $domain['domain_name'] ) ) {
    				$location = 'http://' . DOMAIN_CURRENT_SITE;
    
    				if ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) == true || strpos( $_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer' ) == true ) {
    					header( "Refresh: 0;url=$location ");
    				} else {
    					if ( php_sapi_name() != 'cgi-fcgi' )
    						status_header($status); // This causes problems on IIS and some FastCGI setups
    					header( "Location: $location", true, 301 );
    				}
    
    				die;
    			}
    
    		}
    	}
    
    	foreach( $md_domains as $domain ) {
    		if ( preg_match( '|' . strtolower( $domain['domain_name'] ) . '$|', $using_domain ) ) {
    			define( 'COOKIE_DOMAIN', '.' . strtolower( $domain['domain_name'] ) );
    			break;
    		}
    	}
    }
    
    if( $mapped_id ) {
    	$current_blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE blog_id = %d LIMIT 1 /* domain mapping */", $mapped_id ) );
    	$current_blog->domain = $_SERVER[ 'HTTP_HOST' ];
    
    	$blog_id = $mapped_id;
    	$site_id = $current_blog->site_id;
    
    	define( 'COOKIE_DOMAIN', $_SERVER[ 'HTTP_HOST' ] );
    
    	$current_site = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->site WHERE id = %d /* domain mapping */", $current_blog->site_id ) );
    
    	$current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s /* domain mapping */", $current_site->domain, $current_site->path ) );
    
    	$current_blog->path = $current_site->path;
    
    	define( 'DOMAIN_MAPPING', 1 );
    
    	// Added for belt and braces
    	if ( !defined('WP_CONTENT_URL') ) {
    		$protocol = ( isset( $_SERVER['HTTPS' ] ) && 'on' == strtolower( $_SERVER['HTTPS' ] ) ) ? 'https://' : 'http://';
    		define( 'WP_CONTENT_URL', $protocol . $current_blog->domain . $current_blog->path . 'wp-content'); // full url - WP_CONTENT_DIR is defined further up
    	}
    
    }
  • edward_stanaway

    So, um. This particular question has been going on for a week. I have made 2 follow up posts to an admin query, and have been met with radio silence. My site is currently inaccessible. I have one admin response, which re-iterates instructions put forward on the plugin website. While I recognize the need to re-iterate steps from the manual from a tech support standard, when those steps are carried out it is necessary to delve deeper and ask further questions, not avoid the topic entirely.

    I am worried that this is the level of support I will actually receive throughout this site. I however will not progress with further plugin installation until I achieve basic functionality on my first plugin. To do so would be stupid, and complicate tech support. Tech support so far however is disappointing, at best.

    And thats really the most disappointing part. I signed up with WPMU because it was advertised that you had the best support for your products. I work 16 hour days troubleshooting code and herding cats (ie staff). To have assistance so that I didnt have to stress myself out on various products was music to my ears. However my product is no longer working, after installing one of these, and the support is apparently busy doing something else. That's stressful, and exactly the opposite of why I chose your products. WPMU support was a selling point. To be invisible is unacceptable. If that's the case I'll be filing a case with consumer fraud and demanding a refund. My site was functional without WPMU products. It wasnt what I desired, but it was functional. I signed up with WPMU to expand the capabilities of my network, not bring sites on it completely down.

    What gives?

  • Timothy Bowers

    Hey there.

    Before we go to far here, I felt the frustration in your other thread which I answered. I'm real sorry for the delay here and I can assist further if/whilst Patrick is away.

    I'd handle one plugin at a time but as you mentioned multi domains as well then I'd like to mention our usage tab on the project page.

    Also I am unable to get Multi-Domains to work at all. It is not showing up in installed products despite being present in the proper wp-content/plugins directory, and despite having sunrise.php moved to the proper directory with the proper code entered into wp-config.php

    https://premium.wpmudev.org/project/multi-domains/#usage

    3. Upload multi-domain.php and the multi-domains-files directory to the /wp-content/mu-plugins folder on your site (if you do not have this directory you will need to create it.)

    Based on your first post which I just quoted I suspect this is the reason you can't get it working is that you need to read through the usage instructions and place this plugin within the /mu-plugins/ folder.

    So essentially it sounds like you're using the dm_sunrise.php file but you're not actually using both plugins.

    This file should only be used when both plugins are working on the same site.

    So what I was saying is I'd start with just one and get that working first. Throwing multiple plugins into the mix if you're not familiar with them will only serve to confuse matters initially.

    I'd personally start by using the domain mapping plugin first. So please revert to the sunrise of that plugin, ensure the plugin is installed as per the usage instructions here:

    https://premium.wpmudev.org/project/domain-mapping/#usage

    If it's still not working then please let me know, I'd probably need to take a closer look so would need access to checkout your DNS, Network install and in some instances DB.

    Take care.

  • edward_stanaway

    Hi,

    This doesnt work. I reverted to the original sunrise, copied it over as specified in the instructions, and added my domain of my subsite as follows:

    laudanumonline.com

    mapped to

    http://www.entropianetwork.com/laudanum

    I removed the redirect on my website, allowing this plugin to perform the redirect, else the site would say "redirect loop."

    It just brings me to the landing page of my web host.

    Am going to re-enable the redirect and remove this plugin so users can still access my site by the intended URL.

    Further assistance is appreciated, as it is desirable to get this up and running.

    Thank you for your attention here.

  • Timothy Bowers

    Hey again.

    I pinged your domain name and the IP is 67.20.88.100.

    When I use that IP address I get your Hosting provider. You need to have your dedicated IP resolve to your website. So the DocumentRoot should be that of your WordPress install.

    If it isn't then neither WordPress nor the Domain Mapping plugin will know that the domain exists.

    The other way to map a domain is by using an addon/parked domain where you can define the DocumentRoot yourself.

    You may need to speak with your host to get this setup quickly. They should understand what needs doing with your dedicated IP.

    Take care.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.