forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 bridging => Topic started by: elwave on August 28, 2011, 04:02:35 am

Title: Bridging on my gallery is totally dead :(
Post by: elwave on August 28, 2011, 04:02:35 am
I don't know why... it attempts to establish the bridge with my MyBB forum, but ends up just redirecting to the login page on the forum, but not accepting the logon.

Could anyone come and take a look? It's probably something silly... it's been doing this for a while now though and I'd love to finally get it fixed for my members!

Thanks :)

If anyone wants to help, I'll give you the site URL and a login and stuff. It would help me tremendously!
Title: Re: Bridging on my gallery is totally dead :(
Post by: Joe Carver on August 30, 2011, 02:31:25 am
Start by helping yourself, read here to begin.
http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_steps_start

To unbridge:
http://documentation.coppermine-gallery.net/en/bridging.htm#bridge_manager_recover_start

If anyone wants to help, I'll give you the site URL and a login and stuff.....
If needed, you will have to follow these instructions.
http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_support_start


Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 10, 2011, 12:09:38 am
Thing is though, no matter how much I unbridge it and bridge it again or double and triple check the info I put in... nothing. I think something might be broken in the database or something. I recently overwrote all the gallery's basic files with the ones from a fresh install of Coppermine, but no change :(
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 11, 2011, 08:08:47 pm
If anyone has any thoughts or could come take a peek, I'd appreciate it :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: phill104 on September 11, 2011, 09:54:01 pm
Did it die after you replaced all the files? Did you remember to run update.php? If not run it now and see what happens.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 12, 2011, 04:17:55 am
ah no I don't thiiiink I did that.. I may have done.. I'll run it now anyway :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 12, 2011, 04:28:02 am
Ah, yes it had already been done.

Does it sound plausible my suspicions that it is a database issue not an issue with the gallery's files? I wonder if something has become disrupted in the database (like the users table or something - just throwing out ideas). My knowledge of the Coppermine workings isn't good enough to say exactly :(
Title: Re: Bridging on my gallery is totally dead :(
Post by: phill104 on September 12, 2011, 08:36:58 am
Providing a link to your site would be a good start.

If it failed when you changed some files then it would be possible that some of the files became corrupt. But we really need to see your site first.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 12, 2011, 07:00:21 pm
well, I only overwrote all the files because I was having a problem with changing the settings in the gallery after applying SEO tweaks (which I have now completely removed AFAIK).

Ok here is the gallery:

NOT SAFE FOR WORK (adult content). http://www.sonichentai.net/gallery

(you can understand why I was hesitant to provide it off the bat lol)
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 12, 2011, 07:00:43 pm
oh, and if you want admin login details, I can PM them to you?
Title: Re: Bridging on my gallery is totally dead :(
Post by: phill104 on September 12, 2011, 09:22:46 pm
So it failed when you updated your files? Or had it failed when you were playing with seo?

Also, as you are running 1.5.14 now would be a good time to upgrade to 1.5.16

Once you have done that please do everything outlined by Joe Carver above.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 13, 2011, 12:37:33 am
To be honest, I can't remember the point at which the whole bridge broke. It's been working for a long time. The SEO tweaks broke the user permissions settings (whole image, thumbnails only, etc, for different levels of users), so no matter what I changed it to, it made no difference.

I can update it.. although to be honest I really doubt it will fix it :(

Perhaps I should try resetting or clearing parts of the database so it is forced to recreate them?
Title: Re: Bridging on my gallery is totally dead :(
Post by: phill104 on September 13, 2011, 08:25:52 am
One final attempt, please do as Joe requested - http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_support_start
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 14, 2011, 02:22:28 pm
Hm, I just upgraded the gallery to the latest version. No improvement, BUT I have learned that SOME users on the forum can login, and some can't! Well, I specifically know of one user who can - one of my admins. But my admin account doesn't do it, and my test user account also doesn't.  He did have TONS of secondary user groups, so I've removed them to see if it still works for him.

Hm ._.  This is complicated.

I'll fill in that thing anyway:

I have the following issue when trying to bridge coppermine and MyBB 1.6.3 (I could update it to 1.6.4 but it's unlikely it will work IMO... I could if you want though):

MyBB bridging does not work for all users - most users are not logged in at all to the gallery when they try to. I'm also having issues with group permissions, but this is a secondary issue.

Coppermine install: http://www.sonichentai.net/gallery (I don't know if Coppermine itself has this down as with the www. or without.. I could check but I don't know which file it is)
Bridging app install: http://www.sonichentai.net/forum
Coppermine version: cpg1.5.16
Bridging app version: MyBB 1.6.3
Test user account: testuser5 / testt3st

BridgeManager settings:
Bridge app URL:  http://www.sonichentai.net/forum
Relative path to your bridge app's config file:  ../forum/inc/
Cookie name or prefix:  Not sure (how do I find this out?)
Use bridge app custom groups?:  1  (it doesn't seem to work whether this is on or off though)


Hope that helps!
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on September 14, 2011, 02:44:48 pm
When I have a look at the generated cookies I can see that the Coppermine cookies are created for host
Quote
www.sonichentai.net
with path
Quote
/

and the board cookies are created for host
Quote
.sonichentai.net
with path
Quote
/forum/
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 21, 2011, 11:14:45 pm
Ah ok, yeah I had a look in the config of Coppermine and saw that it was set to call it "coppermine" and the path is /.

So erm.. what should I change where and to what? I would imagine the forum cookie settings are ok and I should change the Coppermine ones? I know how to change the path if I need to (the Cookie Settings section) but I don't know how to change the host?

Thanks a lot! :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on September 22, 2011, 09:23:55 am
The host should be fine, but according to the docs you should adjust the board's cookie path:
Quote from: http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_cookie_start
The cookie path in the forum's configuration should be set to '/' where this option is available.

Some bridging apps have an option to enable sub-domain independant cookies that you should enable if you own the entire domain.

Some bridging apps use a cookie path by default that will make the cookie only available for the bridging app itself and not for other apps that reside in different folders on the webserver. If this is the case for you, you have to review your bridging app's config first and make sure that it is set to allow the cookie from the bridging app to be read by coppermine.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 23, 2011, 12:09:54 am
omg it works!! You clever dude! haha :)  Thanks so much!


I still can't manage to get the permissions working again (as I say, that broke after I applied some SEO tweaks which I now think I've completely removed), so I'd love some help with that (it's quite important to the site that I restrict access a bit again) but I'm so glad the logins are working!
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 23, 2011, 02:34:03 am
but aw damn now some of the forum isn't working properly (the admin CP, it seems). :(
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on September 23, 2011, 09:06:59 am
Maybe you have to clear your cookies, but you better read the board's docs or ask the board's support team.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 23, 2011, 03:27:15 pm
Ok no worries, I'll ask the MyBB guys about that one :)

So erm.. what do you reckon about the permissions problem? It still doesn't matter what I select, guests can still view everything (even if I select only intermediate images, etc).

I tried updating the whole gallery, and overwriting all it's files with a fresh Coppermine install (except for things like my theme files and the albums directory, etc).

I wonder what's upsetting it >.<

And thanks for all the help man, I owe you loads man :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on September 23, 2011, 03:31:41 pm
Maybe you have to adjust the ID of your board's guest group in the Coppermine bridge file bridge/mybb.inc.php:
Code: [Select]
$this->guestgroup  = 1;
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 23, 2011, 03:33:13 pm
and yay you were right about the cookies too!

Damn.. you're smart haha :)

Honestly man like.. if things work and stuff.. I will make a reasonable donation to Coppermine and to MyBB as soon as I get my advertising revenue from SH.net!

I was intending to pay a coder to fix things, but of course if things get working via forums and support threads, I won't need to so can donate the money to these projects instead! ^_^
Title: Re: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 23, 2011, 03:39:16 pm
Maybe you have to adjust the ID of your board's guest group in the Coppermine bridge file bridge/mybb.inc.php:
Code: [Select]
$this->guestgroup  = 1;

oo err.. lol, bit out of my depth there lol

Why do you think it would be best as something other than 1? I wonder what I should try changing it to o.O


Like I say, this stuff broke since I applied the SEO tweaks, so I always IMAGINE something has changed in the database (mainly because I overwrote all the files I edited with fresh files), but I might be totally wrong there. It's kinda strange.
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on September 23, 2011, 04:00:49 pm
Check what's the guest group ID in your board. If it's not the ID "1", then you have to adjust that value to the correct ID.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 25, 2011, 03:45:14 am
That line does read correctly (it =1).

Any other thoughts as to what it might be? ._.
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on September 28, 2011, 11:37:01 am
Please enable debug mode for all users.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on September 28, 2011, 10:17:30 pm
Hm.. I feel a little uneasy giving everyone insight into the workings of the gallery and database and that!

Can I just PM you the details of an admin account or something? :)

(it's currently enabled for admins)
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 01, 2011, 09:45:39 pm
Just bumping this as you might have missed my last post or something :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: phill104 on October 01, 2011, 10:52:50 pm
Enabling the debug really should not put you at risk.
Title: Re: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 02, 2011, 09:44:14 pm
Enabling the debug really should not put you at risk.

Ok man, if you say so I trust you :)

I'll do it now.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 03, 2011, 11:07:58 pm
ok erm.. well it's all done so.. maybe let me know what you think I should look at next? I wonder what is broken ._.
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on October 05, 2011, 01:48:34 pm
From the debug output:
Quote
==========================
USER DATA:
------------------
Array
(
    [user_id] => 0
    [user_name] => Guest
    [groups] => Array
        (
            [0] => 101
        )

    [group_quota] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 0
    [can_post_comments] => 0
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [pub_upl_need_approval] => 1
    [priv_upl_need_approval] => 1
    [access_level] => 2
    [disk_max] => 0
    [disk_min] => 0
    [has_admin_access] => 0
    [group_name] => Guests
    [can_create_public_albums] => 0
    [can_see_all_albums] => 0
    [group_id] => 101
    [allowed_albums] => Array
        (
        )

)

So you have to adjust the settings for the group called "Guests".
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 06, 2011, 09:08:36 pm
But guests can currently view everything, so doesn't that mean they have full access? (1 or 3) despite it being set to 2?

I will set it to the lowest level or maybe just deny all guest access, and we'll find that guests still have full access! lol :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 06, 2011, 09:12:03 pm
There we go! I set it to no access for guests at all, and I still had full access when I went into incognito mode so I was a site guest!

I just changed it to "Thumbnails Only" for guests, so you will find the number has changed (I assume from 2 to 1?) but that the gallery is still totally visible to guests >.<
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on October 07, 2011, 10:45:23 am
The settings from the group manager will be recognized. If they don't get applied can have different causes:
1. Modifications to the Coppermine core code
2. Plugins
3. Theme

I used another theme (curve) and it still doesn't work as expected. Please disable the plugin engine and test again. Please (again) verify that you replaced all Coppermine core files with fresh copies from the official package. Some users reported that their FTP client application has been setup wrongly, so files don't get replaced. So just to make sure download a fresh copy of FileZilla (e.g. the portable edition, so you start with clean settings) and replace all core files again.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 07, 2011, 05:13:29 pm
Right, all done!

Plugins all disabled (API turned off), all files replaced with a fresh lot and update.php run... and still.. no luck :(

I did notice though that I had an SEO-friendly URLs plugin running, but it didn't seem to be replacing any URLs anyway and turning it off seemed to make no difference. I don't know if that's a lead or anything.

I used Filezilla and actually replaced all files (except the album directory and anycontent.php) twice lol (two entire queues).

I wonder what it is >.<
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 10, 2011, 04:15:25 am
quick bump in case this just dropped off the top page! :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on October 11, 2011, 02:13:39 pm
Are you ready to send me FTP data to your gallery directory, so I can perform some tests? If so, I'll send you a PM with my contact details.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 12, 2011, 06:14:20 am
Sure, anytime man, and thanks so much I completely appreciate all this, I know it's getting time consuming and I will definitely donate some money after because you guys totally deserve it!!!

Send me the details and I'll set up the FTP account and send you the details :)
Title: Re: Bridging on my gallery is totally dead :(
Post by: Αndré on October 13, 2011, 02:38:59 pm
Oh my god it was so easy :o

In the Coppermine config there's an option called "Allow unlogged users (guest or anonymous) access". I set it now to "Thumbnails only" and it works as expected. If unbridged that setting is automatically synced with the setting in the group manager. I don't know why this setting exists at all, as you can set the permissions in the group manager. Maybe there are scenarios where you need that setting.
Title: Re: Bridging on my gallery is totally dead :(
Post by: elwave on October 13, 2011, 06:01:23 pm
Wow thank you so much!! That's fantastic - now I get to watch the number of daily online members on the forum LEAP from about 100 to 260 as they all sign up for the gallery lol

It's great because although TOTAL gallery traffic takes a small hit, the community are all mega happy as it boosts forum activity to probably around double lol

Thanks man, I'll make a Coppermine donation when I get back to my pc (on mobile currently). I owe you!! :)