I'm just new enough php to be dangerous to my own sanity, and I hope someone can make enough sense of this to help. Regardless, I appreciate anybody taking the time to read this:
I'm setting up PostNuke, plugging along and I've run into a cookie/domain problem- my own doing! My site can be reached via haseltine.addr.com or by jazes.com, and during setting up, I think I've used them interchangably....dumb.
Now the $domain portion of this thing is where (I think) I'm messed up. I have this:
// Cookie domain
$domain = $HTTP_SERVER_VARS['HTTP_HOST'];
if (empty($domain)) {
$domain = getenv('HTTP_HOST');
}
$domain = preg_replace('/:.*/', '', $domain);
ini_set('session.cookie_domain', $domain);
// Referer check
ini_set('session.referer_check', "$domain$path");
}
SO....how do I fix it so that either url should be treated as jazes.com? I think it's a preg_replace thing, but I can't get my mind around the syntax and placement....
Does this make sense to anyone? I'd sure appreciate any help.
Thanks.