Bridging cpg_redir.php Bridging cpg_redir.php
 

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

Bridging cpg_redir.php

Started by deauvilleuk, October 06, 2005, 09:15:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deauvilleuk

I have got this far using the instruction manual and I entered the following :

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

But got an error message.
my gallery is located at www.deauvilleuk.org/gallery
my forum is located at www.deauvilleuk.org/forum

are my entries correct (obviously not) and what should they be ?

Many Thanks

Graham

Nibbler

With your set up you dont need to modify the file at all, put it back as it was.

deauvilleuk

Ok

I have the following -

phpbb.inc.php

// database configuration
define('PHPBB_DB_NAME','deauvill_phbb1');     // The name of the database used by the board
define('PHPBB_BD_HOST','localhost'); // The name of the database server
define('PHPBB_DB_USERNAME','root');  // The username to use to connect to the    database
define('PHPBB_DB_PASSWORD','');      // The password to use to connect to the database

// The web path to your phpBB directory
// If your URL to your board is for example 'http://yoursite_name.com/phpBB2/',
// you'll have to set the below var to '/phpBB2/'.
define('PHPBB_WEB_PATH', '/forum/');
// Logout Flag
// the value of this boolean constant depends on your phpBB version:
// If your version of phpBB is 2.0.4 or lower - change the value to FALSE;
// if your version of phpBB is 2.0.5 or newer - leave it as TRUE
define('PHPBB_LOGOUT_GET', TRUE);

init.inc.php

// User database integration
// Uncomment the applicable line if you want to use it
define('UDB_INTEGRATION', 'phpbb');
// define('UDB_INTEGRATION', 'invisionboard');
// define('UDB_INTEGRATION', 'vbulletin23');
// define('UDB_INTEGRATION', 'vbulletin30');
// define('UDB_INTEGRATION', 'yabbse');
// define('UDB_INTEGRATION', 'smf');
// define('UDB_INTEGRATION', 'woltlab21');
// define('UDB_INTEGRATION', 'punbb');

cpg_redir.php

<?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;
?>

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

deauvilleuk

When I goto the gallery:

www.deauvilleuk.org/gallery

I get this :

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

MySQL said: Access denied for user 'root'@'localhost' (using password: NO)

Nibbler

Specify valid database details in the bridge file.

deauvilleuk

Found a MySQL login name through my servers control panel - and entered it in the bridge file    deauvill_phbb1

Now I receive the following message

Fatal error :
There was an error while processing a database query

when going to the gallery homepage

Nibbler

Ensure both coppermine and your forum are installed in the same database. Disable the bridge, enable debug mode, re-enable the bridge and reproduce the error. You'll then get a more detailed error report.

deauvilleuk

How do I do that ?

Whilst I was in the server control panel - I took note I have two MySQL databases

1. Database - deauvill_cop1 - username - deauvill_cop1
2. Database - deauvill_phpbb1 - username - deauvill_phpbb1

kegobeer

Both must be in the same database.  You can copy the tables from cop1 to phpbb1 using phpMyAdmin and then everything should work.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

deauvilleuk

Never used phpmyadmin before how do I copy from one to the other ?

kegobeer

Google for phpMyAdmin, visit their website and read their documentation.  That's much more efficient than anything I can tell you.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Fudgemaster

I Was getting that same error..

" Fatal error :
There was an error while processing a database query "

The problem was in my case in the "bridge/phpbb.inc.php"

define('PHPBB_DB_NAME', 'MyDB'); // The name of the database used by the board

I had the wrong database name in there, everything else I had correct in this file.
Now the user accounts work perfectly.
--
It's an insane world.. But I'm proud to be a part of it.

deauvilleuk

I have copied the Coppermine Tables into the PhpBB MySQL database - when I enter everything in the .php files I still get the same:

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

MySQL said: Access denied for user 'root'@'localhost' (using password: NO)

I have tried variations of my database name which states it is deauvill_phpbb1 as _phpbb1, phpbb1, phpbb 

all have the same outcome

Graham

Joachim Müller

your mysql username probably isn't root - make sure you have specified the proper mysql settings in include/config.inc.php. You can't make this up, you have to know it. Ask your webhost when not sure.

deauvilleuk

Got a bit further now -

now when I goto www.deauvilleuk.org/gallery

I get this message :


Warning: main(bridge/phpbb.inc.php) [function.main]: failed to open stream: No such file or directory in /home/deauvill/public_html/gallery/include/init.inc.php on line 240

Fatal error: main() [function.require]: Failed opening required 'bridge/phpbb.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/deauvill/public_html/gallery/include/init.inc.php on line 240

Graham

deauvilleuk

and then this just appeared....

Parse error: parse error, unexpected $ in /home/deauvill/public_html/gallery/bridge/phpbb.inc.php on line 505

Graham

Joachim Müller

it didn't appear out of nowhere: it relates to the changes you made. You'll have to post your changes if you need help. Don't forget to replace sensitive data (your password) with asterisks when posting.

deauvilleuk

phpbb.inc.php

// database configuration
define('PHPBB_DB_NAME', 'phpBB1'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'phpbb1'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD', ''); // The password to use to connect to the database

// The web path to your phpBB directory
// If your URL to your board is for example 'http://yoursite_name.com/phpBB2/',
// you'll have to set the below var to '/phpBB2/'.
define('PHPBB_WEB_PATH', '/forum/');
// Logout Flag
// the value of this boolean constant depends on your phpBB version:
// If your version of phpBB is 2.0.4 or lower - change the value to FALSE;
// if your version of phpBB is 2.0.5 or newer - leave it as TRUE
define('PHPBB_LOGOUT_GET', TRUE);
// ------------------------------------------------------------------------- //
// You can keep the default values below if your instalation is standard
// ------------------------------------------------------------------------- //
// The prefix for the phpBB cookies
define('PHPBB_COOKIE_PREFIX', 'phpbb2mysql'); // The prefix used for board cookies

// Prefix and names for the database tables
define('PHPBB_TABLE_PREFIX', 'phpbb_'); // The prefix used for the DB tables
define('PHPBB_USER_TABLE', 'users'); // The members table
define('PHPBB_SESSION_TABLE', 'sessions'); // The session table
define('PHPBB_GROUP_TABLE', 'groups'); // The groups table
define('PHPBB_UGROUP_TABLE', 'user_group'); // The group/user table


init.inc.php

define('COPPERMINE_VERSION', '1.3.2');
// User database integration
// Uncomment the applicable line if you want to use it
define('UDB_INTEGRATION', 'phpbb');
// define('UDB_INTEGRATION', 'invisionboard');
// define('UDB_INTEGRATION', 'vbulletin23');
// define('UDB_INTEGRATION', 'vbulletin30');
// define('UDB_INTEGRATION', 'yabbse');
// define('UDB_INTEGRATION', 'smf');
// define('UDB_INTEGRATION', 'woltlab21');
// define('UDB_INTEGRATION', 'punbb');

These are the only changes made as you said the cpg_redir.php was ok

Thanks

Graham