Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[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 13799 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

I have the following issue when trying to bridge coppermine and phpBB3:
[error message or problem description here]

Coppermine install: http://www.zorbas.de/scripts/cpgGallery/
Bridging app install: http://www.zorbas.de/scripts/cpgGallery/
Coppermine version: cpg1.5.34
Bridging app version: phpBB 3.1.3
Test user account: testuser / usertest

BridgeManager settings:
Bridge app URL:  http://www.zorbas.de/scripts/phpBB3
Relative path to your bridge app's config file:  ../phpBB3/
Cookie name or prefix:  phpbb3
Use bridge app custom groups?:  No

When clicking on "login" in coppermine it redirects me to the board login.
After logging into the board it won't redirect me back to coppermine.
When accessing the gallery directly I am still not logged in and I can disable the bridge only by directly accessing the bridgemgr.php
I left the bridge active now ffor further testing purposes...
I hope I get help on this as my users would really appreciate the bridge!
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 #1 on: February 09, 2015, 05:31:50 PM »

One issue was obviously the cookie:
Since I changed it from phpbb3 to phpbb3_b5ygn I am logged in also in coppermine, but I still don't get redirected after logging in by the board...
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #2 on: February 09, 2015, 06:30:21 PM »

The redirection is something that needs an edit to phpBB. If you search their boards the edits are detailed in a number of places.
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 #3 on: February 09, 2015, 06:59:00 PM »

I found something in the manual here: http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_individual_bridge_issues_phpbb3

But this is only regarding the logout
AND in my ucp.php I am not able to find:

meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');


Would you please be so kind to point me to the correct posting as I can not find it??
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 #4 on: February 10, 2015, 05:51:51 PM »

Unfortunately couldn't find any help regarding the non.functional redirect when bridging. So I deactivated the bridge for now.
But I am still looking for help regarding this!!
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 #5 on: February 10, 2015, 05:56:26 PM »

One more thing:
When the bridge was still enabled I tried to send an ecard and got the following error:

09. Februar 2015 um 22:01 - While executing query 'SELECT *, username AS user_name, user_email AS user_email, user_regdate AS user_regdate, user_from AS user_location, user_website AS user_website FROM `db466936751`.phpbb3_users WHERE user_id = '2'' in bridge/udb_base.inc.php on line 413 the following error was encountered: 
Unknown column 'user_from' in 'field list'


Now as the bridge is disabled the gallery is sending no emails at all (new user registration/ecards) except the contact form. But that's another topic...
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 #6 on: February 13, 2015, 12:12:48 PM »

I am using version 1.5.34 as stated in my initial post.
I am NOT editing files. I am using the bridge manager.
However, this does not explain the error when trying to send an ecard.
I have now disabled the bridge in the bridge manager as neither redirects nor ecards would work.
What do you suggest to do to get the bridge working??
Logged

Αndré

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

Quote
While executing query 'SELECT *, username AS user_name, user_email AS user_email, user_regdate AS user_regdate, user_from AS user_location, user_website AS user_website FROM `db466936751`.phpbb3_users WHERE user_id = '2'' in bridge/udb_base.inc.php on line 413 the following error was encountered:
Unknown column 'user_from' in 'field list'


Quote from: bridge/udb_base.inc.php
        $sql = "SELECT *, {$this->field['username']} AS user_name, "
                . "{$this->field['email']} AS user_email, "
                . "{$this->field['regdate']} AS user_regdate, "
                . "{$this->field['location']} AS user_location, "
                . "{$this->field['website']} AS user_website "
            . "FROM  {$this->usertable} WHERE {$this->field['user_id']} = '$uid'";
        $result = cpg_db_query($sql, $this->link_id);


Quote from: bridge/phpbb3.inc.php
            // Table field names
            $this->field = array(
                'username' => 'username', // name of 'username' field in users table
                'user_id' => 'user_id', // name of 'id' field in users table
                'password' => 'user_password', // name of 'password' field in users table
                'email' => 'user_email', // name of 'email' field in users table
                'regdate' => 'user_regdate', // name of 'registered' field in users table
                'active' => 'user_active', // is user account active?
                'lastvisit' => 'user_lastvisit', // name of 'location' field in users table
                'location' => 'user_from', // name of 'location' field in users table
                'website' => 'user_website', // name of 'website' field in users table
                'usertbl_group_id' => 'group_id', // name of 'group id' field in users table
                'grouptbl_group_id' => 'group_id', // name of 'group id' field in groups table
                'grouptbl_group_name' => 'group_name' // name of 'group name' field in groups table
            );


This means you need to update the bridge files, as it doesn't seem to be compatible with your phpBB version.
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 #8 on: February 14, 2015, 10:13:59 AM »

Thank you for your help!!  :)
I am trying to always use the latest version of phpBB (currently 3.1.3) and cpg (currently 1.5.34)

Am I right that you want me to edit phpbb3.inc.php and add the line
Code: [Select]
'location' => 'user_from', // name of 'location' field in users table
I was also searching on the coppermine-gallery.net website if there is a central location to find the latest bridge files - no luck. Or am I missing something here??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15170
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #9 on: February 14, 2015, 10:56:26 AM »

If the bridge files aren't included in the Coppermine package, you may find them here in the bridge or bridge contributions board.
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 #10 on: February 14, 2015, 12:05:48 PM »

Thanks André,

That's where I probably found them.
But what you mean by
Quote from: André
If the bridge files aren't included in the Coppermine package ...
I was checking the 'cpg1.5 bridging' forum right now and as I did not find the files right away I ask myself is the following:
Why is there not a 'sticky' topic for those files at the top of the forum?? That would make it much easier to always find the latest bridge files...

And regarding my question: Should I add now the line you mentioned to my phpbb3.inc.php ??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15170
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #11 on: February 14, 2015, 12:23:38 PM »

You don't need to add that line, but adjust it, so it matches your phpBB database. Obviously something changed, as the field was either renamed, moved or removed.
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 #12 on: February 14, 2015, 12:49:40 PM »

In my database (phpBB  3.1.3)

in the table
'prefix_users' there is no field anymore corresponding to 'location'

However, this field is found now in the table
'prefix_profile_fields_data' named as 'pf_phpbb_location'

What I would have to do in this case?
Maybe someone is willing to adapt the phpbb.inc.php to the phpBB 3.1.x version? It seems quite a lot has changed...
And there is still the redirect issue also...
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #13 on: February 14, 2015, 02:35:11 PM »

Again, the redirect has to be done by editing the phpBB files, not the Coppermine files. That is something better asked over at the phpBB forums as we do not know their code.

I'll try and do an install of phpBB locally tomorrow and see what changes there are.
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: Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #14 on: February 14, 2015, 02:56:41 PM »

Again, the redirect has to be done by editing the phpBB files, not the Coppermine files.
Got that. In ucp.php as I understood...

I'll try and do an install of phpBB locally tomorrow and see what changes there are.
That would be great!!

That is something better asked over at the phpBB forums as we do not know their code.
I will do so...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15170
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #15 on: February 14, 2015, 08:44:50 PM »

Phill, according to this post, some field names have changed and some fields have been moved to a new table. Unfortunately the user hasn't posted more details what exactly has been changed, but maybe this can be found somewhere in the release notes of phpBB 3.1.


I'll try and do an install of phpBB locally tomorrow and see what changes there are.
I'll do this now and post what I found out when I finish my work today.
Logged

Αndré

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

The file install/convertors/convert_phpbb20.php contains a map of new -> old (table +) field names, e.g.
Quote
         array(
            'target'      => PROFILE_FIELDS_DATA_TABLE,
            'primary'      => 'users.user_id',
            'query_first'   => array(
               array('target', $convert->truncate_statement . PROFILE_FIELDS_DATA_TABLE),
            ),

            array('user_id',            'users.user_id',               'phpbb_user_id'),
            array('pf_phpbb_occupation',   'users.user_occ',               array('function1' => 'phpbb_set_encoding')),
            array('pf_phpbb_interests',      'users.user_interests',            array('function1' => 'phpbb_set_encoding')),
            array('pf_phpbb_location',      'users.user_from',               array('function1' => 'phpbb_set_encoding')),
            array('pf_phpbb_icq',         'users.user_icq',               array('function1' => 'phpbb_set_encoding')),
            array('pf_phpbb_wlm',         'users.user_msnm',               array('function1' => 'phpbb_set_encoding')),
            array('pf_phpbb_yahoo',         'users.user_yim',               array('function1' => 'phpbb_set_encoding')),
            array('pf_phpbb_aol',         'users.user_aim',               array('function1' => 'phpbb_set_encoding')),
            array('pf_phpbb_website',      'users.user_website',            'validate_website'),

            'where'         => 'users.user_id <> -1',
         ),
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15170
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #17 on: February 14, 2015, 09:33:03 PM »

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.
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 #18 on: February 15, 2015, 08:46:55 PM »

Sounds easy. Thank you. Will try that with my phpBB 3.1.x  :)
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 #19 on: February 15, 2015, 09:15:00 PM »

I changed the lines in my phpbb3.inc.php as you suggested and did the following:
- uploaded edited phpbb3.inc.php
- enabled bridging
- logged out.
- Logging in at coppermine --> got redirected to phpbb. Logged in there. --> No redirect back to cpg
- Manually went back to cpg and I was logged in.
- Tried to send an ecard --> Message that the card was send and no errors anymore. BUT the card was not received in the end!!
- Tried to send a contact mail --> Received it immediately.
- Disabled bridge
- Checked registration settings and group settings --> nothing changed as I can see.
- Tried again to send an ecard --> Message that the card was send and no errors anymore. BUT the card was not received in the end!! And this was working before enabling the bridge!!

Dunno watodo now...
Logged
Pages: [1] 2   Go Up
 

Page created in 0.083 seconds with 19 queries.