Loging into coppermine after SMF integration Loging into coppermine after SMF integration
 

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

Loging into coppermine after SMF integration

Started by huwb, June 05, 2005, 12:17:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

huwb

After hours of trying to search through my files and sorting it out on my own, I still have a problem, I have looked through the support forum and can find other problems but not identical to mine.

I have integrated coppermine with my smf forum, but when i log into coppermine, I go to the forum log in (which I understand is quite normal, but then when I go to the gallery section it does not let me view my admin profile, but prompts me to log in again. I looked on the SMF support forum and in there I found a part answer which was to change cookies from local to domain, which I have done. the only thing left I can thing now is that perhaps there is an error with the coding in smf.inc.php so now I am quoting my code here, I have replaced my password with *'s for security purposes.

can someone help me along my way
// Set this to the location of your Settings file:
$path = '../smf';

// Comment this out if you want to default user's group to 'Registered'
// rather than using Post Count based groups.
define('USE_POST_GROUPS', 1);

// Set the names of implied groups here
define('CM_ADMIN_GROUP_NAME', 'Administrators');
define('CM_MEMBERS_GROUP_NAME', 'Registered');
define('CM_GUEST_GROUP_NAME', 'Anonymous');
define('CM_BANNED_GROUP_NAME', 'Banned');
define('CM_GMOD_GROUP_NAME', 'Global Moderators');

// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //

// Otherwise, try to autodetect SMF path if not set:
if (substr($path, -1) == '/')
        $path = substr($path, 0, -1);

$possible_paths = array($path, '..', '../forum', '../forums',
'../community', '../yabbse', '../smf');

$correct = 0;
while (!file_exists($possible_paths[$correct] . '/Settings.php') &&
count($possible_paths) > $correct)
        $correct++;

require_once($possible_paths[$correct] . '/Settings.php');

define ('SMF', 1);

// other includes
cm_include_smf_funcs("$sourcedir/Load.php", array("reloadSettings", "md5_hmac", "loadUserSettings"));
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats", "updateSettings"));

// database configuration
define('SMF_DB_NAME', 'db121262902' ); // The name of the database used by the board
define('SMF_DB_HOST', 'db408.oneandone.co.uk' ); // The name of the database server
define('SMF_DB_USERNAME', 'dbo121262902'); // The username to use to connect to the database
define('SMF_DB_PASSWORD', '*************'); // The password to use to connect to the database

// The web path to your SMF Board directory
define('SMF_WEB_PATH', "../smf/");

// The Name of the Cookie used for SMF logon
define('SMF_COOKIE_NAME', 'smf1_');

// Prefix for the database tables
define('SMF_TABLE_PREFIX', $db_prefix); // Table Prefix

// Names for the database tables
define('SMF_USER_TABLE', 'members'); // The members table
define('SMF_GROUP_TABLE', 'membergroups'); // The groups table

// Group definitions (default values used by the board)
define('SMF_GMOD_GROUP', 2);
define('SMF_BANNED_GROUP', -3);
define('SMF_GUEST_GROUP', -1);
define('SMF_MEMBERS_GROUP', -2);
define('SMF_ADMIN_GROUP', 1);

define('SMF_PASSWD_SEED', 'ys');

function cm_include_smf_funcs ($source_file, $fun

Nibbler

Put everything below


// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //


back as it was, and read the sticky on how to request bridging support.

huwb

Okay so I have put everything back as the coppermine download was, the only edited file is int.inc. The bridge file has not been ammended, as the path to smf is correct

here is a link to my forum http://www.gayswansea.com/smf/
and here is a link to the gallery http://www.gayswansea.com/gallery/

I have registered a test user account on my forum
username: testuser
password: gallery


below is the bridge code that is currently being used, but still when I log into my forum it does not remember who I am when I go to the gallery
// Set this to the location of your Settings file:
$path = '../smf';

// Comment this out if you want to default user's group to 'Registered'
// rather than using Post Count based groups.
define('USE_POST_GROUPS', 1);

// Set the names of implied groups here
define('CM_ADMIN_GROUP_NAME', 'Administrators');
define('CM_MEMBERS_GROUP_NAME', 'Registered');
define('CM_GUEST_GROUP_NAME', 'Anonymous');
define('CM_BANNED_GROUP_NAME', 'Banned');
define('CM_GMOD_GROUP_NAME', 'Global Moderators');

// ------------------------------------------------------------------------- //
// Nothing to edit below this line
// ------------------------------------------------------------------------- //

// Otherwise, try to autodetect SMF path if not set:
if (substr($path, -1) == '/')
        $path = substr($path, 0, -1);

$possible_paths = array($path, '..', '../forum', '../forums',
'../community', '../yabbse', '../smf');

$correct = 0;
while (!file_exists($possible_paths[$correct] . '/Settings.php') &&
count($possible_paths) > $correct)
        $correct++;

require_once($possible_paths[$correct] . '/Settings.php');

define ('SMF', 1);

// other includes
cm_include_smf_funcs("$sourcedir/Load.php", array("reloadSettings", "md5_hmac",

"loadUserSettings"));
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats",

"updateSettings"));

// database configuration
define('SMF_DB_NAME', $db_name); // The name of the database used by the board
define('SMF_DB_HOST', $db_server); // The name of the database server
define('SMF_DB_USERNAME', $db_user); // The username to use to connect to the database
define('SMF_DB_PASSWORD', $db_passwd); // The password to use to connect to the database

// The web path to your SMF Board directory
define('SMF_WEB_PATH', "$boardurl/");

// The Name of the Cookie used for SMF logon
define('SMF_COOKIE_NAME', $cookiename);

// Prefix for the database tables
define('SMF_TABLE_PREFIX', $db_prefix); // Table Prefix

// Names for the database tables
define('SMF_USER_TABLE', 'members'); // The members table
define('SMF_GROUP_TABLE', 'membergroups'); // The groups table

huwb


Nibbler

Take that dot out of the smf cookie name, it is not a legal character for a cookie name.

huwb

Quote from: Nibbler on June 06, 2005, 08:07:34 PM
Take that dot out of the smf cookie name, it is not a legal character for a cookie name.

I don't have a dot in the cookie name, if you mean the _ when I delete that from my cookie names I get this error when people are viewing the site


Table 'db121262902.smf1settings' doesn't exist

kegobeer

No, the cookie name is gaywansea.com.  You can't have a dot in the name.  You need to verify your SMF and Coppermine cookie names again.  Typical cookie names are SMFCookie10 and cpg133.
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

huwb

sorry it's been a long day, I have now changed cookie name and I think it is finally working, at least now when I log into gallery it gives me admin status... phew.....

thanks you guys and sorry to be a pain in the but

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