Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 09:03 am EST
Geeklog Forums
Geeklog 1.3.11 with phpbbbridge and Gallery Remote Applet
Status: offline
tav
Forum User
Newbie
Registered: 08/04/05
Posts: 5
Hello,
I just installed phpbbbridge and it works great. But then I noticed that Gallery Remote java applet stopped to work. When viewing albums as a full screen java applet slide show, I get the following error: "Error: Server contacted, but Gallery not found at this URL (http://www.ampiainen.net/gallery/GalleryRemote2.php)"
When I looked at the Apache server logs, there is following line:
xxx.yy.zz.xx - - [04/Aug/2005:16:51:57 +0300] "GET /gallery/?sid=46787358cc9e8fafefd893355ef476fb HTTP/1.1" 200 81606
I believe this is the problem. Because phpbbbridge sends session id behind URL, it breaks Gallery Remote applet.
I'd appreciate any kind of help to solve this problem.
BR,
-T
I just installed phpbbbridge and it works great. But then I noticed that Gallery Remote java applet stopped to work. When viewing albums as a full screen java applet slide show, I get the following error: "Error: Server contacted, but Gallery not found at this URL (http://www.ampiainen.net/gallery/GalleryRemote2.php)"
When I looked at the Apache server logs, there is following line:
xxx.yy.zz.xx - - [04/Aug/2005:16:51:57 +0300] "GET /gallery/?sid=46787358cc9e8fafefd893355ef476fb HTTP/1.1" 200 81606
I believe this is the problem. Because phpbbbridge sends session id behind URL, it breaks Gallery Remote applet.
I'd appreciate any kind of help to solve this problem.
BR,
-T
10
10
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
These sids have become such a problem I am removing them for the next version. For now, feel free to find where the append_sid function is defined in the phpBB file sessions.php and replace it with:
{
global $SID;
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
//$url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;
}
That should hopefully work. Make a backup of this file, first, just in case.
Text Formatted Code
function append_sid($url, $non_html_amp = false){
global $SID;
if ( !empty($SID) && !preg_match('#sid=#', $url) )
{
//$url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
}
return $url;
}
That should hopefully work. Make a backup of this file, first, just in case.
9
11
Quote
Status: offline
tav
Forum User
Newbie
Registered: 08/04/05
Posts: 5
Hello and thanks for your very fast reply.
Unfortanately modification of session.php didn't help. I also tried by uncommenting the line which was commented in your replacement code.
There still in Apache access_log:
192.168.1.88 - - [04/Aug/2005:18:54:46 +0300] "POST /gallery/gallery_remote2.php HTTP/1.1" 302 5
192.168.1.88 - - [04/Aug/2005:18:54:50 +0300] "GET /gallery/?sid=deb6782b5d624dd56ca1895cc2f1cc67 HTTP/1.1" 200 73336
and I get the same error message on browser which I posted last time.
BR,
-T
Unfortanately modification of session.php didn't help. I also tried by uncommenting the line which was commented in your replacement code.
There still in Apache access_log:
192.168.1.88 - - [04/Aug/2005:18:54:46 +0300] "POST /gallery/gallery_remote2.php HTTP/1.1" 302 5
192.168.1.88 - - [04/Aug/2005:18:54:50 +0300] "GET /gallery/?sid=deb6782b5d624dd56ca1895cc2f1cc67 HTTP/1.1" 200 73336
and I get the same error message on browser which I posted last time.
BR,
-T
9
9
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
I've never tried this before, but check out
http://demo.turias.net/phpbb/viewtopic.php?t=186
Let me know how well that works for you.
http://demo.turias.net/phpbb/viewtopic.php?t=186
Let me know how well that works for you.
11
8
Quote
Status: offline
asmaloney
Forum User
Full Member
Registered: 02/08/04
Posts: 214
Turias,
I don't have this installed and haven't used it, but I thought I'd throw this out anyways...
In the append_sid() function, can't you just check that the url you're adding the sid to is in fact a
phpBB url?
I do something similar in the GUS plugin - I only add the css file if the page being viewed is actually a GUS page.
- Andy
I don't have this installed and haven't used it, but I thought I'd throw this out anyways...
In the append_sid() function, can't you just check that the url you're adding the sid to is in fact a
phpBB url?
I do something similar in the GUS plugin - I only add the css file if the page being viewed is actually a GUS page.
- Andy
11
27
Quote
Status: offline
tav
Forum User
Newbie
Registered: 08/04/05
Posts: 5
Quote by Turias: I've never tried this before, but check out
http://demo.turias.net/phpbb/viewtopic.php?t=186
Let me know how well that works for you.
http://demo.turias.net/phpbb/viewtopic.php?t=186
Let me know how well that works for you.
I did try that and something similar. None of these worked. I examined the problem bit further. I edited session.php and found a solution to get rid of SID behind URL.
This is the place on session.php
Text Formatted Code
/ Added by Turias
// If for some reason the login is not synched between Geeklog and phpBB... sync it.
if (defined('PHPBBBRIDGE_INSTALLED'))
[clip]
else
{
$location = $path . '?sid=' . $userdata['session_id'];
}
[clip]
If I comment out the line above, I will get rid opf SID behind URL, but GalleryRemote still dont work. I get the same error message on browser. From Apache logs there are two lines which explains situation a bit:
Text Formatted Code
192.168.1.88 - - [05/Aug/2005:09:21:13 +0300] "POST /gallery/gallery_remote2.php HTTP/1.1" 302 5
192.168.1.88 - - [05/Aug/2005:09:21:15 +0300] "GET /gallery/gallery_remote2.php HTTP/1.1" 200 231
When disabling phpBBbridge GalleryRemote works and the lines on Apache access log:
Text Formatted Code
192.168.1.88 - - [04/Aug/2005:23:43:34 +0300] "POST /gallery/gallery_remote2.php HTTP/1.1" 200 217
192.168.1.88 - - [04/Aug/2005:23:43:36 +0300] "POST /gallery/gallery_remote2.php HTTP/1.1" 200 16087
192.168.1.88 - - [04/Aug/2005:23:43:36 +0300] "GET /albums/Lomienjalkeen/im000222.sized.jpg HTTP/1.1" 304 -
The is two POST requests for gallery_remote2.php. With phpBBbridge enabled the second line turns to GET. The third line above is just getting the images for slide show.
Is there somehow two sessions mixed or what is the problem? I believe I dont have enough understanding about PHP, Gallery and phpBB to fix this. Any help higly appreciated.
BR,
-T
10
12
Quote
Status: offline
tav
Forum User
Newbie
Registered: 08/04/05
Posts: 5
I checked now GalleryRemoteLog.txt
This seems cookie mismatch caused by phpBBbridge.
From GalleryRemoteLog.txt
4105725|INFO |GRApplet |gr_url: http://www.ampiainen.net/gallery
4105725|INFO |GRApplet |gr_url_full: http://www.ampiainen.net/gallery/gallery_remote2.php
4105726|INFO |GRApplet |gr_cookie_name: gl_session
4105726|INFO |GRApplet |gr_cookie_domain:
4105726|INFO |GRApplet |gr_cookie_path: /
4105726|INFO |GRApplet |gr_album: Lomienjalkeen
4105726|TRACE|GRApplet |Full URL: http://www.ampiainen.net/gallery/gallery_remote2.php
4105726|TRACE|GRApplet |Adding cookie: gl_session=654215076; path=/; domain=www.ampiainen.net
4105726|INFO |GalComm2 |Logging in to http://www.ampiainen.net/gallery/gallery...
4105726|TRACE|GalComm2 |login parameters: [HTTPClient.NVPair[name=cmd,value=login], HTTPClient.NVPair[name=protocol_version,value=2.3], null, null]
4105726|TRACE|GalComm2 |Url: /gallery/gallery_remote2.php
4105726|TRACE|GalComm |Sending cookie: gl_session=654215076; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: LastVisit=1123233631; expires=Sat Aug 05 12:20:31 EEST 2006; path=/; domain=.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; expires=Sat Aug 05 12:20:32 EEST 2006; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_sid=98c06dc7040fbff87f05e802cac34480; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A1%3A%224%22%3B%7D; expires=Sat Aug 05 12:20:32 EEST 2006; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_sid=e0852dc8fe703eddcdffda8b4f3d1636; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Sending cookie: phpbb2mysql_sid=e0852dc8fe703eddcdffda8b4f3d1636; path=/; domain=www.ampiainen.net
4107538|TRACE|GalComm |Sending cookie: phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A1%3A%224%22%3B%7D; expires=Sat Aug 05 12:20:32 EEST 2006; path=/; domain=www.ampiainen.net
4107538|TRACE|GalComm |Sending cookie: gl_session=654215076; path=/; domain=www.ampiainen.net
4107538|TRACE|GalComm |Sending cookie: LastVisit=1123233631; expires=Sat Aug 05 12:20:31 EEST 2006; path=/; domain=.ampiainen.net
4110270|TRACE|GalComm |Accepting cookie: LastVisit=1123233633; expires=Sat Aug 05 12:20:33 EEST 2006; path=/; domain=.ampiainen.net
4110270|TRACE|GalComm |Accepting cookie: LastVisitTemp=1123233631; expires=Fri Aug 05 12:30:33 EEST 2005; path=/; domain=.ampiainen.net
4110270|TRACE|GalComm |Accepting cookie: PHPSESSID=0cbf401793838d323da94371680f0f66; path=/; domain=www.ampiainen.net
GalleryRemote should only get gl_session and PHPSESSID cookies. phpBBbridge should never send phpbb2mysql_sid cookie and interacting with Gallery Remote anyway.
Don't exactly know, but this cookie mismatch creates following:
4115114|TRACE|GalComm2 |Failed to log in to http://www.ampiainen.net/gallery/gallery...
And that's why the GR stops to work after phpBBbridge is enabled.
Is there anyway to stop phpBBbridge interacting with Gallery and not sending session cookies when those are not intended?
BR,
-T
This seems cookie mismatch caused by phpBBbridge.
From GalleryRemoteLog.txt
Text Formatted Code
4105725|INFO |GRApplet |gr_url: http://www.ampiainen.net/gallery
4105725|INFO |GRApplet |gr_url_full: http://www.ampiainen.net/gallery/gallery_remote2.php
4105726|INFO |GRApplet |gr_cookie_name: gl_session
4105726|INFO |GRApplet |gr_cookie_domain:
4105726|INFO |GRApplet |gr_cookie_path: /
4105726|INFO |GRApplet |gr_album: Lomienjalkeen
4105726|TRACE|GRApplet |Full URL: http://www.ampiainen.net/gallery/gallery_remote2.php
4105726|TRACE|GRApplet |Adding cookie: gl_session=654215076; path=/; domain=www.ampiainen.net
4105726|INFO |GalComm2 |Logging in to http://www.ampiainen.net/gallery/gallery...
4105726|TRACE|GalComm2 |login parameters: [HTTPClient.NVPair[name=cmd,value=login], HTTPClient.NVPair[name=protocol_version,value=2.3], null, null]
4105726|TRACE|GalComm2 |Url: /gallery/gallery_remote2.php
4105726|TRACE|GalComm |Sending cookie: gl_session=654215076; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: LastVisit=1123233631; expires=Sat Aug 05 12:20:31 EEST 2006; path=/; domain=.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; expires=Sat Aug 05 12:20:32 EEST 2006; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_sid=98c06dc7040fbff87f05e802cac34480; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A1%3A%224%22%3B%7D; expires=Sat Aug 05 12:20:32 EEST 2006; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Accepting cookie: phpbb2mysql_sid=e0852dc8fe703eddcdffda8b4f3d1636; path=/; domain=www.ampiainen.net
4107537|TRACE|GalComm |Sending cookie: phpbb2mysql_sid=e0852dc8fe703eddcdffda8b4f3d1636; path=/; domain=www.ampiainen.net
4107538|TRACE|GalComm |Sending cookie: phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A1%3A%224%22%3B%7D; expires=Sat Aug 05 12:20:32 EEST 2006; path=/; domain=www.ampiainen.net
4107538|TRACE|GalComm |Sending cookie: gl_session=654215076; path=/; domain=www.ampiainen.net
4107538|TRACE|GalComm |Sending cookie: LastVisit=1123233631; expires=Sat Aug 05 12:20:31 EEST 2006; path=/; domain=.ampiainen.net
4110270|TRACE|GalComm |Accepting cookie: LastVisit=1123233633; expires=Sat Aug 05 12:20:33 EEST 2006; path=/; domain=.ampiainen.net
4110270|TRACE|GalComm |Accepting cookie: LastVisitTemp=1123233631; expires=Fri Aug 05 12:30:33 EEST 2005; path=/; domain=.ampiainen.net
4110270|TRACE|GalComm |Accepting cookie: PHPSESSID=0cbf401793838d323da94371680f0f66; path=/; domain=www.ampiainen.net
GalleryRemote should only get gl_session and PHPSESSID cookies. phpBBbridge should never send phpbb2mysql_sid cookie and interacting with Gallery Remote anyway.
Don't exactly know, but this cookie mismatch creates following:
Text Formatted Code
4115114|TRACE|GalComm2 |Failed to log in to http://www.ampiainen.net/gallery/gallery...
And that's why the GR stops to work after phpBBbridge is enabled.
Is there anyway to stop phpBBbridge interacting with Gallery and not sending session cookies when those are not intended?
BR,
-T
8
8
Quote
Status: offline
tav
Forum User
Newbie
Registered: 08/04/05
Posts: 5
I got few very helpfull tips from GR developer.
Very fast fix which came in my mind based on the Paour's help, was to change gr_cookie_name to be something static instead of getting it by executing php.
So I changed gr_cookie_name to PHPSESSID in Gallery's util.php. This works for GR full screen slide show, but almost definitely breaks something else. I also noticed, that this could be set to anything else too, but haven't really checked what it should be.
No changes to phpBBbridge.
I hope this could help some one else too, and possible some one would find a more robust solution for this.
BR,
-T
Very fast fix which came in my mind based on the Paour's help, was to change gr_cookie_name to be something static instead of getting it by executing php.
So I changed gr_cookie_name to PHPSESSID in Gallery's util.php. This works for GR full screen slide show, but almost definitely breaks something else. I also noticed, that this could be set to anything else too, but haven't really checked what it should be.
No changes to phpBBbridge.
I hope this could help some one else too, and possible some one would find a more robust solution for this.
BR,
-T
11
8
Quote
All times are EST. The time is now 09:03 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content