Bridging error: cpggetmicrotime() (previously declared in / Bridging error: cpggetmicrotime() (previously declared in /
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Bridging error: cpggetmicrotime() (previously declared in /

Started by DingDong, July 17, 2006, 08:37:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DingDong

Hi.

I`m pretty new with Coppermine but i thought i`d try bridging to a site i have. All i need is to make copperming recognize the users/passwords/email... Admins/Moderators/ etc will be different on both sites.

Here`s my error:
Fatal error: Cannot redeclare cpggetmicrotime() (previously declared in /hsphere/local/home/xxxxx/xxxxx.xxxxx.com/image/include/init.inc.php:35) in /hsphere/local/home/xxxxx/xxxxx.xxxxx.comimage/include/init.inc.php on line 33

And here`s my settings:
// Switch that allows overriding the bridge manager with hard-coded values
define('USE_BRIDGEMGR', 1);

require_once 'bridge/udb_base.inc.php';

class cpg_udb extends core_udb {

   function cpg_udb()
   {
      global $BRIDGE;
      
      if (!USE_BRIDGEMGR) {
         $this->boardurl = 'http:/// Switch that allows overriding the bridge manager with hard-coded values
define('USE_BRIDGEMGR', 1);

require_once 'bridge/udb_base.inc.php';

class cpg_udb extends core_udb {

   function cpg_udb()
   {
      global $BRIDGE;
      
      if (!USE_BRIDGEMGR) {
         $this->boardurl = 'http://xxx.xxxx.com';
         require_once('../include/config.php');
         $this->use_post_based_groups = 0;
      } else {
         require_once($BRIDGE['relative_path_to_config_file'] . '/config.php');
         $this->boardurl = $INFO['board_url'];';
         require_once('../include/config.php');
         $this->use_post_based_groups = 0;
      } else {
         require_once($BRIDGE['relative_path_to_config_file'] . '/config.php');
         $this->boardurl = $INFO['board_url'];

I`ve searched for a solution but came up short. Anyone with a suggestion?

DingDong

Nibbler

Don't edit the bridge file, instead follow the instructions in the manual. When asked for the relative path to your BBS, ensure that you enter the relative path to your BBS.

DingDong

Yeah ok. Thx

I`m trying though just to have a few things to bridge (id, username, password, email and reg date). So i`ll haveto edit that anyway right?

will this work?
// Board table names
$this->table = array(
'users' => 'users',
'groups' => 'users_level',
);

// Derived full table names
$this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
$this->groupstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users_level'];

// Table field names
$this->field = array(
'username' => 'username', // name of 'username' field in users table
'user_id' => 'id', // name of 'id' field in users table
'password' => 'password', // name of 'password' field in users table
'email' => 'email', // name of 'email' field in users table
'regdate' => 'joined', // name of 'registered' field in users table
);

// Pages to redirect to
$this->page = array(
'register' => '/register.php',
'editusers' => '/admin.php',
'edituserprofile' => '/index.php?showuser='
);

// Connect to db
$this->connect();
}

function login_page()
{
$this->redirect("/login.php");
}

function logout_page()
{
$this->redirect("/logout.php");
}
}

// and go !
$cpg_udb = new cpg_udb;


DingDong


DingDong

I`m trying to make coppermine read off another UDB from the users table on username, password, email, regdate. just those. am i far out on that code?

Nibbler

If the software you are bridging to is not one of those listed then you'll need to make your own bridge file. The error you are getting is caused by you telling Coppermine to include itself.

Joachim Müller

Do as Nibbler suggested and read the docs, bridging section.

DingDong

Ah, that sounds about right. I`ll read more about it for sure. Thx for the help though...

And BTW, this software seems awesome ;D

DingDong

Hi again.

I read and i`ve been working on a bridge file until i read through init.inc.php. This file defines the tables used right?

Is it possible to make an array here:
$CONFIG['TABLE_USERS']      = $CONFIG['TABLE_PREFIX'].'users';

Making it read from another UDB in sertain areas of that table instead of bridging?

Making something like :
$CONFIG['TABLE_USERS']      = $CONFIG['TABLE_PREFIX'].'users';
$this->field = array(
                        'username' => 'username', // name of 'username' field in users table
                        'user_id' => 'id', // name of 'id' field in users table
                        'password' => 'password', // name of 'password' field in users table
                        'email' => 'email', // name of 'email' field in users table
                        'regdate' => 'joined', // name of 'registered' field in users table
                );


Does anyone know how that would look like?

DingDong