Cookies Logout / Login Problem / Domain Mapping


I have recently setup a fresh blank WP 3.9.1 environment on LAMP. All working fine including permalinks.

Have enabled Multisite with sub-domain choice. All working just fine although I did had to define the following as Multisite as I was having the eternal loop of death that is documented elsewhere.

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

I then enabled Google Apps Login plugin and managed to get that all working for my main site and sub-sites. Logins all authenticate using Google now. Brilliant.

Next challenge domain mapping to the 2 other sites I have created.

As soon as I enable Domain Mapping, e.g the sunrise.php file (which is here in the wp-config.php file) it all goes wrong.

define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', '');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

/* define('SUNRISE', 'on'); */

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

From that point onwards I'm unable to login/logout properly from every domain/link etc. Tried to comment out the COOKIE_DOMAIN define on/off as I was using WP MU Domain Mapping free plugin. Makes no difference. Main issue although it can vary is you cannot logout of the 'network' domain URL's. When you clear the cookie you can't get back in to the 'network' domain URL's.

I think I have the subsite's login/logout working fine but just not sure.

I have enabled cross domain auto-login (as this is what I would like in place) and 'domain entered by user' for the admin and login mapping.

Some more details
<VirtualHost *:80>
DocumentRoot /var/www/html/essex/wordpress
ServerName www
ServerAlias *
<Directory /var/www/html/essex/wordpress>
AllowOverride Fileinfo Options
# Logging
ErrorLog /var/log/httpd/wordpress-error-log
CustomLog /var/log/httpd/wordpress-access-log common

I've replaced the real emails and domain names for privacy reasons.

Can you please help me get this working. Let me know of any details you need.

The reason for purchasing this plugin was for the support and I am expecting a resolution by using this plugin.

Look forward to the correct configuration I should have in place.

Robin Cotgrove