coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: Soliloquy on January 20, 2007, 08:11:15 AM

Title: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Soliloquy on January 20, 2007, 08:11:15 AM
I have the following issue when trying to bridge coppermine and vBulletin:
Unable to connect to UDB database!
MySQL says ...
The config file is in /includes, but when I try to enter that the bridging wizard says includesincludes/ is not valid.  I then tried using ../ and it was accepted.  When I enabled the bridge that's when I got the error message.  I then tried using phpMyAdmin to change it to ../includes/ and ../include but still no luck.

Coppermine install: http://www.clown-forum.com/clown_gallery/
Forum install: http://www.clown-forum.com/
Coppermine version: cpg1.4.10
Forum version: vBulletin 3.6.4
Test user account: test / pass

BridgeManager settings:
Forum URL:  http://www.clown-forum.com/
Relative path to your BBS's config file:  ../
Use post-based groups?:  0
Cookie name/preifx (if applicable)


Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Joachim Müller on January 20, 2007, 11:15:03 AM
Enable bridging if you want help.
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Soliloquy on January 21, 2007, 07:00:59 AM
Ok... try again please.
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Nibbler on January 21, 2007, 12:15:58 PM
Check your forum's includes/config.php for blank spaces at the start or end of your servername, password etc. I think vb3 trims them but Coppermine doesn't.
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Soliloquy on January 21, 2007, 07:42:06 PM
No stray spaces in any of the variables.  Anything else it could be?  (What should I do about the path?)
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Nibbler on January 21, 2007, 07:48:32 PM
../ is the correct path.

You can try to get more information about the problem with a code change, look in bridge/vbulletin30.inc.php, find


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


and before it, add


var_dump($this->db);


See if that gives you the data you are expecting. Reverse the change immediately though.
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Soliloquy on January 21, 2007, 08:24:51 PM
array(5) { ["name"]=> NULL ["host"]=> string(9) "localhost" ["user"]=> NULL ["password"]=> NULL ["prefix"]=> NULL } Coppermine critical error:
Unable to connect to UDB database !

MySQL said:

I don't think it's reading the config file, though the path is correct (../).  I tried it with config.php's permissions at both 755 and 777, no change.
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Nibbler on January 21, 2007, 08:37:59 PM
Hmm, I don't know why that is. Maybe the format of the file has changed in 3.6 or something. You can hardcode the db details into the bridge file for now, just remove the autodetection code here


if (isset($config['Database']['dbname']))
{
  // Running on vBulletin 3.5.x
    $this->db = array(
        'name' => $config['Database']['dbname'],
        'host' => $config['MasterServer']['servername'] ? $config['MasterServer']['servername'] : 'localhost',
        'user' => $config['MasterServer']['username'],
        'password' => $config['MasterServer']['password'],
        'prefix' => $config['Database']['tableprefix']
);
} else {
  // Running on vBulletin 3.0.x
    $this->db = array(
    'name' => $dbname,
    'host' => $servername ? $servername : 'localhost',
    'user' => $dbusername,
    'password' => $dbpassword,
    'prefix' =>$tableprefix
);
}


and type the details straight in


    $this->db = array(
    'name' => 'your database name here',
    'host' => 'localhost',
    'user' => 'db user name',
    'password' => 'db password',
    'prefix' => 'table prefix',
);


Similar thing for the cookie prefix further down.
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Soliloquy on January 22, 2007, 12:31:51 AM
Still the same :(  Only the forum URL, path, and post-based groups variable are getting written to the database.  May I PM you my vbulletin30.inc.php file to make sure I didn't screw it up?
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Nibbler on January 22, 2007, 12:35:07 AM
OK.
Title: Re: problem bridging vBulletin 3.6.4 and 1.4.10
Post by: Soliloquy on January 22, 2007, 06:54:31 AM
Hard-coding the database information and cookie prefix solved the problem; Coppermine is successfully bridged.:)