coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: iyeru on September 12, 2008, 02:49:53 AM

Title: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 02:49:53 AM
I get this error when using the wizard:

Coppermine critical error:
Unable to connect to UDB database !

MySQL said:
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 02:52:11 AM
Here's the real info...

Coppermine install: http://iyeru42.info/gallery/
Forum install: http://iyeru42.info/forum/
Coppermine version: cpg1.4.19
Forum version: MyBB 1.4.1
Test user account: None at the moment, if requested, I'll give one, but not now.

BridgeManager settings:
Forum URL:  http://iyeru42.info/forum
Relative path to your BBS's config file:  ../forum/inc/
Use post-based groups?:  0
Cookie name/preifx N/A
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:34:28 AM
More info:

When it tries to bridge, the bridge information is blank, database name, database user, database host, etc. Trying to add these all in manually via the bridge table doesn't help.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:55:50 AM
Quote from: iyeru on September 12, 2008, 03:34:28 AM
More info:

When it tries to bridge, the bridge information is blank, database name, database user, database host, etc. Trying to add these all in manually via the bridge table doesn't help.

Since the new config.php is as follows:

<?php
/**
 * Database configuration
 *
 * Please see the MyBB Wiki for advanced
 * database configuration for larger installations
 * http://wiki.mybboard.net/
 */

$config['database']['type'] = 'mysqli';
$config['database']['database'] = '';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = '';
$config['database']['password'] = '';

/**
 * Admin CP directory
 *  For security reasons, it is recommended you
 *  rename your Admin CP directory. You then need
 *  to adjust the value below to point to the
 *  new directory.
 */

$config['admin_dir'] = 'admin';

/**
 * Hide all Admin CP links
 *  If you wish to hide all Admin CP links
 *  on the front end of the board after
 *  renaming your Admin CP directory, set this
 *  to 1.
 */

$config['hide_admin_links'] = 0;

/**
 * Data-cache configuration
 *  The data cache is a temporary cache
 *  of the most commonly accessed data in MyBB.
 *  By default, the database is used to store this data.
 *
 *  If you wish to use the file system (cache/ directory), MemCache or eAccelerator
 *  you can change the value below to 'files', 'memcache' or 'eaccelerator' from 'db'.
 */

$config['cache_store'] = 'db';

/**
 * Memcache configuration
 *  If you are using memcache as your data-cache,
 *  you need to configure the hostname and port
 *  of your memcache server below.
 *
 * If not using memcache, ignore this section.
 */

$config['memcache_host'] = 'localhost';
$config['memcache_port'] = 11211;

/**
 * Super Administrators
 *  A comma separated list of user IDs who cannot
 *  be edited, deleted or banned in the Admin CP.
 *  The administrator permissions for these users
 *  cannot be altered either.
 */

$config['super_admins'] = '1';

/**
 * Database Encoding
 *  If you wish to set an encoding for MyBB uncomment 
 *  the line below (if it isn't already) and change
 *  the current value to the mysql charset:
 *  http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html
 */

$config['database']['encoding'] = 'utf8';

/**
 * Automatic Log Pruning
 *  The MyBB task system can automatically prune
 *  various log files created by MyBB.
 *  To enable this functionality for the logs below, set the
 *  the number of days before each log should be pruned.
 *  If you set the value to 0, the logs will not be pruned.
 */

$config['log_pruning'] = array(
'admin_logs' => 365// Administrator logs
'mod_logs' => 365// Moderator logs
'task_logs' => 30// Scheduled task logs
'mail_logs' => 180// Mail error logs
'user_mail_logs' => 180// User mail logs
'promotion_logs' => 180 // Promotion logs
);
 
?>
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 04:01:31 AM
Even after editing the mybb bridge file in coppermine to the correct way, it still doesn't get my session data, and I'm forever logged out of coppermine.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 04:07:42 AM
Quote from: iyeru on September 12, 2008, 04:01:31 AM
Even after editing the mybb bridge file in coppermine to the correct way, it still doesn't get my session data, and I'm forever logged out of coppermine.

Also, I can no longer login to the bridge manager standalone for some reason, even though I supplied the correct login info.
Title: Re: MyBB 1.4 Integration...
Post by: Fabricio Ferrero on September 12, 2008, 04:14:25 AM
It's no necesary to post 6 times in a road. It's enough with the first post. If you get some error search with the search button (right?) and you will get an answer.

http://forum.coppermine-gallery.net/index.php/topic,49733.0.html (http://forum.coppermine-gallery.net/index.php/topic,49733.0.html)
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 04:17:44 AM
Quote from: fabri on September 12, 2008, 04:14:25 AM
It's no necesary to post 6 times in a road. It's enough with the first post. If you get some error search with the search button (right?) and you will get an answer.

http://forum.coppermine-gallery.net/index.php/topic,49733.0.html (http://forum.coppermine-gallery.net/index.php/topic,49733.0.html)

No, I don't get an error with invalid credentials to connect to the MySQL Host.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 04:22:43 AM
If you don't like us posting so many times in a row, allow us to edit our posts.

Also, I can login to my bridge manager now. But I still need the session issue fixed.
Title: Re: MyBB 1.4 Integration...
Post by: Joachim Müller on September 12, 2008, 07:45:16 AM
Coppermine doesn't support mysqli, but only mysql. Your mybb config file is not relevant here. If you have bridging issues, do exactly as suggested in the docs, section "Bridging support" (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating_support_start). The same piece of advice can be found in the sticky thread on this board named "When requesting bridge support - mandatory! (http://forum.coppermine-gallery.net/index.php/topic,24032.0.html)". Both the docs section as well as the sticky has been named that way for apparent reasons.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 02:32:24 PM
Quote from: Joachim Müller on September 12, 2008, 07:45:16 AM
Coppermine doesn't support mysqli, but only mysql. Your mybb config file is not relevant here. If you have bridging issues, do exactly as suggested in the docs, section "Bridging support" (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#integrating_support_start). The same piece of advice can be found in the sticky thread on this board named "When requesting bridge support - mandatory! (http://forum.coppermine-gallery.net/index.php/topic,24032.0.html)". Both the docs section as well as the sticky has been named that way for apparent reasons.

read second post for that info.

Also, I just re-installed myBB 1.4.1 with MySQL (not MySQLi) and it still keeps me logged out of coppermine even though I'm logged into the board.
Title: Re: MyBB 1.4 Integration...
Post by: Nibbler on September 12, 2008, 02:37:27 PM
Bridging to MyBB 1.4 is not supported. The bridge is for MyBB 1.02. Edit the bridge file and change


// Database connection settings
$this->db = array(
'name' => $config['database'],
'host' => $config['hostname'],
'user' => $config['username'],
'password' => $config['password'],
'prefix' =>$config['table_prefix']
);


to


// Database connection settings
$this->db = array(
'name' => $config['database']['database'],
'host' => $config['database']['hostname'],
'user' => $config['database']['username'],
'password' => $config['database']['password'],
'prefix' => $config['database']['table_prefix']
);


That should fix the connection issue but MyBB 1.4 may have changed too much since 1.02 for the bridge file to work.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 02:41:42 PM
I've already done that myself, but I can't login to the gallery via the board.
Title: Re: MyBB 1.4 Integration...
Post by: Nibbler on September 12, 2008, 02:46:22 PM
You need to fix your cookie path. It's set to /forum/ which means Coppermine can't read it.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 02:49:37 PM
Quote from: Nibbler on September 12, 2008, 02:46:22 PM
You need to fix your cookie path. It's set to /forum/ which means Coppermine can't read it.

What should I change then? If I go into myBB and change the cookie path to /gallery/ then MyBB cannot read its own cookies.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:08:43 PM
Seems I had to change it from /forum/ to just /
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:10:48 PM
But now it says I'm logged in to the gallery even though I'm logged out of the board. -_-
Title: Re: MyBB 1.4 Integration...
Post by: Nibbler on September 12, 2008, 03:15:10 PM
Clear your cookies. Post a test account if you still have issues.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:17:56 PM
Quote from: Nibbler on September 12, 2008, 03:15:10 PM
Clear your cookies. Post a test account if you still have issues.

Now I'm logged out even though I'm logged into the board. -_-

Test Account: GalleryTest
Password: cpg_test
Title: Re: MyBB 1.4 Integration...
Post by: Nibbler on September 12, 2008, 03:23:25 PM
Your cookie path is still /forum/. It can't work like that.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:24:35 PM
Quote from: Nibbler on September 12, 2008, 03:23:25 PM
Your cookie path is still /forum/. It can't work like that.

What should I set it to in myBB? ../ ?
Title: Re: MyBB 1.4 Integration...
Post by: Nibbler on September 12, 2008, 03:27:51 PM
Just "/"
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:28:43 PM
Quote from: Nibbler on September 12, 2008, 03:27:51 PM
Just "/"

That's what it was at when you just replied a moment ago.
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:33:57 PM
Fixed it, but....

"Your user ID could not be verified to log you out. This may have been because a malicious Javascript was attempting to log you out automatically. If you intended to log out, please click the Log Out button at the top menu."

Is what happens when I try to logout from coppermine.
Title: Re: MyBB 1.4 Integration...
Post by: Nibbler on September 12, 2008, 03:44:29 PM
You need to fix something in mybb. See http://forum.coppermine-gallery.net/index.php/topic,51781.0.html
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:52:43 PM
Quote from: Nibbler on September 12, 2008, 03:44:29 PM
You need to fix something in mybb. See http://forum.coppermine-gallery.net/index.php/topic,51781.0.html

After I did those edits, it still says that....
Title: Re: MyBB 1.4 Integration...
Post by: iyeru on September 12, 2008, 03:59:14 PM
Nevermind, I had to clear my cookies too, not just the cache.
Title: Re: MyBB 1.4 Integration...
Post by: Joachim Müller on September 12, 2008, 07:33:10 PM
Quote from: iyeru on September 12, 2008, 02:32:24 PM
read second post for that info.
That posting didn't contain all needed information. The test user account was missing for example. I find it strange that you don't even read what supporters suggest...