Recent Topics

1 Oct 28, 2008 07:34    

My b2evolution Version: 2.x

hi
i am having two subdomain. i will be logout if i peview the post or visit the site from admin.
my subdomains are www.med.myseda.com and www.dental.myseda.com
please help me to set the cookie or base url.

my base url is $baseurl = rtrim('http://www.myseda.com/voice/','/')."/";

2 Oct 29, 2008 05:18

i am posting cookies from _advanced. if there is anything to be changed plz let me know

// ** Cookies **

/**
 * This is the path that will be associated to cookies.
 *
 * That means cookies set by this b2evo install won't be seen outside of this path on the domain below.
 *
 * @global string Default: preg_replace( '#https?://[^/]+#', '', $baseurl )
 */
$cookie_path = preg_replace( '#https?://[^/]+#', '', $baseurl );

/**
 * Cookie domain.
 *
 * That means cookies set by this b2evo install won't be seen outside of this domain.
 *
 * We'll take {@link $basehost} by default (the leading dot includes subdomains), but
 * when there's no dot in it, at least Firefox will not set the cookie. The best
 * example for having no dot in the host name is 'localhost', but it's the case for
 * host names in an intranet also.
 *
 * Note: ".domain.com" cookies will be sent to sub.domain.com too.
 * But, see http://www.faqs.org/rfcs/rfc2965:
 *	"If multiple cookies satisfy the criteria above, they are ordered in
 *	the Cookie header such that those with more specific Path attributes
 *	precede those with less specific.  Ordering with respect to other
 *	attributes (e.g., Domain) is unspecified."
 *
 * @global string Default: ( strpos($basehost, '.') ) ? '.'. $basehost : '';
 */
if( strpos($basehost, '.') === false )
{	// localhost or windows machine name:
	$cookie_domain = '';
}
elseif( preg_match( '~^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$~i', $basehost ) )
{	// Use the basehost as it is:
	$cookie_domain = $basehost;
}
else
{
	$cookie_domain = preg_replace( '/^(www\. )? (.+)$/xi', '.$2', $basehost );

	// When hosting multiple domains (not just subdomains) on a single instance of b2evo,
	// you may want to try this:
	// $cookie_domain = '.'.$_SERVER['HTTP_HOST'];
	// or this: -- Have a cookie domain of 2 levels only, base on current basehost.
	// $cookie_domain = preg_replace( '/^( .* \. )? (.+? \. .+? )$/xi', '.$2', $basehost );
	// fp> pb with domains like .co.uk !?
}

// echo $cookie_domain;

/**#@+
 * Names for cookies.
 */
// The following remember the comment meta data for non registered users:
$cookie_name    = 'cookie'.$instance_name.'name';
$cookie_email   = 'cookie'.$instance_name.'email';
$cookie_url     = 'cookie'.$instance_name.'url';
// The following handles the session:
$cookie_session = 'cookie'.$instance_name.'session';
/**#@-*/

/**
 * Expiration for cookies.
 *
 * Value in seconds, set this to 0 if you wish to use non permanent cookies (erased when browser is closed).
 *
 * @global int Default: time() + 31536000; // One year from now
 */
$cookie_expires = time() + 31536000;

/**
 * Expired-time used to erase cookies.
 *
 * @global int time() - 86400;    // 24 hours ago
 */
$cookie_expired = time() - 86400;

3 Oct 29, 2008 21:57

Add this line in conf/_advanced.php $cookie_domain = '.myseda.com';
And comment out or delete the following.

if( strpos($basehost, '.') === false )
{   // localhost or windows machine name:
   $cookie_domain = '';
}
elseif( preg_match( '~^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$~i', $basehost ) )
{   // Use the basehost as it is:
   $cookie_domain = $basehost;
}
else
{
   $cookie_domain = preg_replace( '/^(www\. )? (.+)$/xi', '.$2', $basehost );

   // When hosting multiple domains (not just subdomains) on a single instance of b2evo,
   // you may want to try this:
   // $cookie_domain = '.'.$_SERVER['HTTP_HOST'];
   // or this: -- Have a cookie domain of 2 levels only, base on current basehost.
   // $cookie_domain = preg_replace( '/^( .* \. )? (.+? \. .+? )$/xi', '.$2', $basehost );
   // fp> pb with domains like .co.uk !?
}

Use this $baseurl

$baseurl = 'http://www.myseda.com/voice/';

Good luck

4 Oct 31, 2008 04:46

thank you
i did change as you said but still having some problem. improved alot now, i can jump around the blogs in the admin. but when i preview my post i can not see the content and after changing the skin i will be out of admin. if i go back (clicking on back tab on the browser) i can work in admin, i do not have to login again. in the admin i have set the url to

http://med.myseda.com/blogname.php

.


Form is loading...