header("Location: http://".$cpg_host.$cpg_path); header("Location: http://".$cpg_host.$cpg_path);
 

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

header("Location: http://".$cpg_host.$cpg_path);

Started by SxSnipeR, September 25, 2004, 08:02:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SxSnipeR

I have no cash jus need a simple explaination of what exactly goes in this and how and where. Everything on my copper mins is set up apart from that bit. The install documentation isnt simple enuf for my simple mind.
im geussing its summat like:

header("Location: http://".$cpg_host.humbug$cpg_path/picviewer/);
or
header("Location: http://"humbug.$cpg_hostcgi.dragonzero.plus.net/picviewer/.$cpg_path);
or ... Ugh no idea

Nibbler

You don't edit that line atall, you just setup the $cpg_path as described. The paid help board is only for people seeking paid help.

$cpg_path='/gallery';

SxSnipeR

#2
right so it should be:

<?php
if (!$_SERVER['HTTP_HOST']) {
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='http://cgi.dragonzero.plus.com/picviewer/';;
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>

YeaH? HMM wonder why its not working  ???

In fact it might of worked, im not sure how i would know if its worked or not, the main site is www.sxsniper.co.uk ull find it in the screenshots OR the forums section im not sure which 1 i should keep or wether u should keep them both.  ::)


SxSnipeR

#4
Seems to have dun summat, but im not sure how to tell wether they are integrated or not.
My user manager and anything to do with users isnt working :/
I also cant get my admin panel on PHPBB2 or Logout!

SxSnipeR

#5
Heres what i have phpbb.inc.php:

// database configuration
define('PHPBB_DB_NAME', 'dragonzero_pn'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'humbug'); // The name of the database server
define('PHPBB_DB_USERNAME', 'dragonzero'); // 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', '/phpBB2/');
// 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', 'phpbb2_'); // 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

Then the cpg_redir.php

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

The cookie name is cpg131 in CPG
and is phpbb2mysql in phpBB2
Have they gotta be the same?

Ok ive made them the same but now it logs me out but not in :O

i found this im wondering if i must edit it such as the "_data" to "phpbb2mysql"

    // Retrieve cookie stored login information
    if (!isset($HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX . '_data'])) {
        $cookie_uid = 0;
        $cookie_pass = '*';
    } else {
        $sessiondata = unserialize($HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX . '_data']);
        if (is_array($sessiondata)) {
            $cookie_uid = (isset($sessiondata['userid'])) ? intval($sessiondata['userid']) : 0;
            $cookie_pass = (isset($sessiondata['autologinid'])) ? addslashes($sessiondata['autologinid']) : '*';
        } else {
            $cookie_uid = 0;
            $cookie_pass = '*';
        }
    }
    // If autologin was not selected, we need to use the sessions table
    if ($cookie_uid && !$cookie_pass && isset($HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX . '_sid'])) {
        $session_id = addslashes($HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX . '_sid']);

RIGHT i deleted my cookies and it let me log into phpbb2 but whn i log into cpg it flicks m to phpbb2 and when i type my pass in it doesnt work. nuthing happends. Could this be because i have an account under the same name in cpg... but the pass is the same :O sigh argh sum1 try signing up and posting a pic

OMG now its auto logged me out and i cant get back in to do the admin work  like change the cookies back :O

Nibbler

Cookie names must be different, as stated in the documentaion.

Only edit what it tells you to, if you start messing with the rest of the code you will only make more problems.

define('PHPBB_BD_HOST', 'humbug'); // The name of the database server
Are you sure about that ?






SxSnipeR

Bah i removed it all i need the forums workin over night

Joachim Müller


SxSnipeR