2 Domains, 2 Galleries, 1 Database - How? 2 Domains, 2 Galleries, 1 Database - How?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

2 Domains, 2 Galleries, 1 Database - How?

Started by xDazedx, August 28, 2004, 03:31:27 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

xDazedx

I am not sure how to set this up. Maybe it is easier than I think.

I have a site that is related to another site. I wanted to keep the Photo Galleries separate but share the same database (phpbb) and obviously have one login for Gallery 1, Gallery 2 and Database 1.  Gallery 1 and Database 1 are bridged. How do I add Gallery 2 into the picture (pun intended!).

Nibbler

You install gallery 2 with a different prefix and then bridge it with the forum.

xDazedx

Quote from: Nibbler on August 28, 2004, 03:42:44 AM
You install gallery 2 with a different prefix and then bridge it with the forum.

Yeah I got the error and renamed the prefix....from there I was getting concerned :)

Thanks I will give it a shot!

xDazedx

Need some help with the bridge I think. I copied the exisiting phpbb.inc.php and init.inc.php to domain2/gallery/directories and made the below modifications.

The cpg_redir.php I did not touch because it was already installed from Gallery 1 and Database 1. Will any changes need to be made?

The phpbb.inc.php I changed the prefix on. Will the ('PHPBB_WEB_PATH', '/forum/'); need to be changed to "http://www.site1.com/forum/" since they do not share the same domain?

The init.inc.php I did not see any changes that needed to be made.

note - these are all hosted on the same server. Domain2 is a subdomain from Domain1.

When I go to www.domain2.com/gallery I get the below error and my browser is redirected to www.domain2.com.domain1.com/gallery/

Coppermine critical error:
Unable to connect to phpBB Board database !

MySQL said: Unknown MySQL Server Host 'dogpawe_forum' (1)

Any ideas? Back to experimenting!

Thanks

Nibbler

What you are attempting is possible, you just need to get the settings right, 'dogpawe_forum' doesnt look like a host to me, it looks like a db name.
You will need to play with the paths a little to make the redirection work for a subdomain.

xDazedx

Quote from: Nibbler on August 28, 2004, 04:37:05 AM
What you are attempting is possible, you just need to get the settings right, 'dogpawe_forum' doesnt look like a host to me, it looks like a db name.
You will need to play with the paths a little to make the redirection work for a subdomain.

Yeah you hit that on the head. Resolved that issue and can now access the gallery. Two more questions and with luck this will be resolved. Your help has been nothing short of outstanding.

The original path for the gallery was domain2/gallery which now redirects to http://domain2.com.domain1.com/gallery/. Huh? Is that right lol????? I did not think there would be any redirect on this, only the forum.

Second I think I need help on the cpg_redir.php if anyone can help. I made no modifications to this file since it was setup for DB1 and Domain1 and worked fine. I am not sure what, if any changes I need. When I click on the login link I get a 404 error.  When reading the setup file on this script, it said no changes should be made if gallery and phpbb are on the same domain which they are. Now I added a second domain and am unsure of how to redirect.

Thanks again for the help.