coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: kemper on November 21, 2005, 04:51:40 AM

Title: cpg_redir.php error
Post by: kemper on November 21, 2005, 04:51:40 AM
I have completed all of the documented steps for integration of Coppermine 1.3.5 and PHPBB2.  When I go to login, it sends me to PHPBB2 login.  After I enter username and password, log in sends me to: http://www.mysite.com/forum/cpg_redir.php?sid=e7e0a43cf5d2e46a4ad38bbad8718e72.  This only displays 403 Forbidden Page, "You are not authorized to view this page".

What could I have done incorrectly?  How can I rectify?

Assistance is greatly appreciated.

Awesome product!
Title: Re: cpg_redir.php error
Post by: Joachim Müller on November 21, 2005, 07:12:48 AM
When requesting bridge support.. (http://forum.coppermine-gallery.net/index.php?topic=17684.0)
An error 403 forbidden is not directly related to coppermine, but to your webserver setup: does the user have permissions to access the cpg_redir.php file on your server? Posting an actual link to your site instead of a dummy url would have helped...
Title: Re: cpg_redir.php error
Post by: kemper on November 22, 2005, 03:14:47 AM
I do have permission.

http://www.wyndhamhillswi.net/forum/cpg_redir.php?sid=e7e0a43cf5d2e46a4ad38bbad8718e72
Title: Re: cpg_redir.php error
Post by: Nibbler on November 22, 2005, 03:31:24 AM
You need to either get index.php set to be displayed automatically when going to /gallery by using DirectoryIndex or mod the redirect so it does this:

$cpg_path='/gallery/index.php';
Title: Re: cpg_redir.php error
Post by: kemper on November 22, 2005, 03:35:00 AM
how do I do this?
Title: Re: cpg_redir.php error
Post by: Nibbler on November 22, 2005, 03:38:03 AM
Instead of this:


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



You can put this:


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



Help using DirectoryIndex is beyond the scope of this support board, if you want to use that then search the web. Also please correct the coppermine version info in your profile as you are running 1.3.x not 1.4.x
Title: Re: cpg_redir.php error
Post by: kemper on November 22, 2005, 03:39:25 AM
duh!  I'll give it a whirl.
Title: Re: cpg_redir.php error
Post by: kemper on November 22, 2005, 03:43:49 AM
Dammit!  It was something that simple.  I should have thought of that myself.  Thanks for the assistance!