Advanced search  

News:

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

Pages: 1 [2]   Go Down

Author Topic: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery  (Read 16743 times)

0 Members and 1 Guest are viewing this topic.

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #20 on: February 15, 2015, 09:19:05 PM »

Can someone beat me please??  :o
ecards went again in the spam folder. With bridge enabled and without...  :-[
But what about the redirecting back from phpbb after logging in??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #21 on: February 15, 2015, 09:25:01 PM »

But what about the redirecting back from phpbb after logging in??

Phill already told you twice what to do!
Logged

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #22 on: February 15, 2015, 09:30:17 PM »

I started a thread in the phpbb forums, but no luck yet...
https://www.phpbb.com/community/viewtopic.php?f=496&t=2297011&p=13955291#p13954221
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4371
    • Windsurf.me

The current code in udb_base.inc.php doesn't support joining other tables. But as neither user_location nor user_website is used anywhere in the rest of the Coppermine code (at least I haven't found a direct access to it), we can simply replace
Code: [Select]
                'location' => 'user_from', // name of 'location' field in users table
                'website' => 'user_website', // name of 'website' field in users table
with
Code: [Select]
                'location' => "''", // name of 'location' field in users table
                'website' => "''", // name of 'website' field in users table

This should fix the error message when bridged to phpBB 3.1 and should also work with phpBB 3.0. If somebody can verify that it works for both, I'll update the bridge file accordingly.

All seems to work fine for me in both versions.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4371
    • Windsurf.me
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #24 on: February 15, 2015, 11:58:19 PM »

ecards went again in the spam folder. With bridge enabled and without...  :-[
That will be a setting on your mail client. Nothing we can do to help with that.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #25 on: February 16, 2015, 09:08:13 AM »

Thanks Phill for checking this out.
Of course the fact that the ecards went into my spam folder was my or the mail client fault...
So the adjusted phpbb3.inc.php by Andé works fine now!  :D

However, I don't understand why the login/logout redirects were working with your local fresh installs of both, cpg 1.5.34 and phpBB 3.1.3
Both, cpg and phpbb are updated versions and not fresh installs on my server.
Do you think it would be a good idea to do a fresh install of both to get this bl&*!dy redirect working?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4371
    • Windsurf.me
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #26 on: February 16, 2015, 02:12:15 PM »

No, the redirects do not work on my install unless I modify files on phpBB. As I am only testing there is no need for me to go down the route of learning the edits to phpBB. They are documented on the phpBB site, at least they were for older versions and probably on these forums too. Hopefully someone from phpBB will respond on their forums.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #27 on: February 16, 2015, 05:15:59 PM »

Ok! That explais a lot.
So I am going on to chase the subject on phpbb forums.
In case I find a solution, I will post it to this thread...
Logged

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #28 on: February 16, 2015, 06:20:32 PM »

Just found the following on the German phpBB board for older versions:

Quote
Create a file in your phpBB root directory named cpg_redir.php
Content:
Code: [Select]
<?php
if (!$_SERVER['HTTP_HOST']) {
  
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
Could that still do the trick??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #29 on: February 16, 2015, 06:40:48 PM »

Please unterstand that we're not the phpBB support. Either test it yourself or ask the phpBB team/community.
Logged

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #30 on: February 16, 2015, 08:38:47 PM »

Please unterstand that we're not the phpBB support. Either test it yourself or ask the phpBB team/community.

I completely understand that. I do not really await support from you directly, just thought that there may be other users of coppermine with the same problem. And solving problems is for the benefit of everyone - isn't it?
However, I think that Coppermine - a great and popular program, which I use for many years now - should also have at least some interest that bridges to other popular community scripts work and like this make both even more interesting...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15277
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #31 on: February 16, 2015, 10:18:18 PM »

Made phpBB 3 bridge compatible with phpBB version 3.1.x in SVN revision 8772.
Logged

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #32 on: February 17, 2015, 04:46:45 PM »

I made it!!  8)
Redirects working perfectly...

I created a file 'redirect.php' for the phpBB root folder:

My redirect.php:
Code: [Select]
<?php
define
('IN_PHPBB'true);
$phpbb_root_path './';
$phpEx substr(strrchr(__FILE__'.'), 1);
include(
$phpbb_root_path 'common.' $phpEx);

$redirect_target '../CoppermineFolder';    /* Path to Coppermine!  */

$user->session_begin(); 
$auth->acl($user->data);

if(!
$user->data['is_registered'])
{
login_box($redirect_target);
}
else if (
$user->data['user_id'] != ANONYMOUS && $request->is_set('sid') && $request->variable('sid''') === $user->session_id)
        {
            
$user->session_kill();
        }

redirect($redirect_target);

And changed the following part in phpbb3.inc.php:
Code: [Select]
.
.
.

        function login_page()
        {
            global $CONFIG;

            $redirect = urlencode($CONFIG['site_url']);
            $this->redirect("/redirect.php");
        }

        function logout_page()
        {
            global $CONFIG;

            $redirect = urlencode($CONFIG['site_url']);
            $this->redirect("/redirect.php?mode=logout&redirect=$redirect&sid=" . $this->session_id);
        }
.
.
.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.087 seconds with 21 queries.