coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: powweb on April 27, 2005, 06:12:43 PM

Title: Bridged with PHPBB2 in different domain
Post by: powweb on April 27, 2005, 06:12:43 PM
OK now I keep seeing posts where people say that you can not bridge CPM with a forum in a different domain. However in the documentation for creating the cpg_redir.php file for php it says it can be done. This is from the documentation

Quote$cpg_host - contains the domain pointer to Coppermine. If Coppermine and phpBB are installed on the same server and domain (the "normal" case), you should leave the default value. Otherwise you should provide a string constant which contains the domain where Coppermine is installed (for example: 'www.my-other-domain.com').

So according to the directions it can be done...

SO my question is this....

What part of the cpg_redir.php do you change the host?

example:
Quote<?php
if (!$_SERVER['HTTP_HOST']) {
  $cpg_host=Change.domain.here;
} else {
  $cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>

or

Quote<?php
if (!$_SERVER['HTTP_HOST']) {
  $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  $cpg_host=change.domain.here;
}
$cpg_path='/';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>

Or could I just do the following

<?php

header
("Location: http://domain/path);
exit;
?>


What I am tring to do is this:

have my forum on forumdomain.com
and the gallery on picsdomain.com
Title: Re: Bridged with PHPBB2 in different domain
Post by: Nibbler on April 28, 2005, 05:26:11 PM
Redirection isn't the issue. The reason you can't have them on different domains is because cookies can only be read from the domain on which they are set.