Module: Gallery Remote Protocol 2

the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Mon, 2011-06-20 15:15

About
This module makes Gallery 3 compatible to the widely available Gallery Remote 1.5.1.
More details: http://codex.gallery2.org/Gallery3:Modules:remote

Download
https://github.com/the0ne/gallery3-contrib/tree/remote

Know issues
not all interface functions were fully tested
manual patching of the gallery-install is necessary
possibly lots of yet-to-find bugs :)
base folders have to be created via the gallery web gui

 
montlo02

Joined: 2011-05-16
Posts: 5
Posted: Wed, 2011-07-13 16:02

I have this message :

"Gallery Remote can find no protocol implementation at the URL http://lesmonatgne.toile-libre.org/gallery/.
Check with a web browser that http://lesmonatgne.toile-libre.org/gallery/ is a valid Gallery URL."

I activate the module, add .htaccess block and modify file modules/gallery/config/cookie.php...

Where is the problem ???

Thank you very much.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2011-07-13 16:08

That URL returns a 404 page, so it doesn't exist.
____________________________________________
Like Gallery? Like the support? Donate now!

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Sun, 2011-07-17 18:46

hi montlo02!

what nivekiam is trying to say is that there is absolutely no valid gallery installation in your /gallery/ folder at all:
Toile-Libre: Erreur 404
Cette page n'existe pas sur les serveurs de Toile-Libre. Si vous pensez qu'elle existe, contactez le Webmaster de ce site.

hence, also the gallery remote module cannot work.

please make sure that
http://lesmonatgne.toile-libre.org/gallery/
works before trying to activate the gallery remote module.

please make sure that
http://lesmonatgne.toile-libre.org/gallery/gallery_remote2.php
returns a blank page before trying to use gallery remote

br,
the0ne

 
DixitS

Joined: 2009-10-08
Posts: 31
Posted: Sat, 2011-07-16 01:55

I got this module installed and patched the coookie.php with the "false" statement and then adding the block into the .htaccess at the top (with the only exception being that my gallery runs on a domain with the /gallery3 instead of the /gallery you have in your mod rewrite). I keep getting an error on Gallery Remote trying to connect.

Looking at the Gallery Remote log file it cant seem to connect to it. Here is the snippit of it with my domain name changed. You can see the 500 error on here as well.

1962375|TRACE|GalComm   |No proxy
1962375|TRACE|GalComm   |Trying protocol 2 for http://Domain.com/gallery3/
1962375|TRACE|GalComm   |Sending cookie: g3sid=f2058af2fe30b2cfdef5f806b0547ca24185280b%7Edd51652bb895100fdaa9c8a126856dc0; expires=Fri Jul 22 21:27:28 EDT 2011; path=/; domain=.domain.com
1962565|TRACE|GalComm   |Accepting cookie: g3sid=dd51652bb895100fdaa9c8a126856dc0; expires=Fri Jul 22 21:36:08 EDT 2011; path=/; domain=.domain.com
1962565|TRACE|GalComm   |Accepting cookie: g3sid=f2058af2fe30b2cfdef5f806b0547ca24185280b%7Edd51652bb895100fdaa9c8a126856dc0; expires=Fri Jul 22 21:36:08 EDT 2011; path=/; domain=.domain.com
1962565|TRACE|GalComm   |tryComm /gallery3/gallery_remote2.php: 500
1962565|TRACE|GalComm   |Trying protocol 2.5 for http://domain.com/gallery3/
1962565|TRACE|GalComm   |Sending cookie: g3sid=f2058af2fe30b2cfdef5f806b0547ca24185280b%7Edd51652bb895100fdaa9c8a126856dc0; expires=Fri Jul 22 21:36:08 EDT 2011; path=/; domain=.domain.com
1962682|TRACE|GalComm   |tryComm /gallery3/main.php?g2_controller=remote.GalleryRemote&g2_form[cmd]=no-op: 404
1962682|ERROR|Gallery   |No protocol implementation found

I saw your statement above about trying the link of the website to see if you get a blank page by going to gallery_remote2.php, when I try this I get a 500 error page.

If I disable the remote module, then try to hit the page via browser I get the page missing error from Gallery3 which tells me the rewrite module is pointing to the file correct, im assuming.

I cant seem to figure out why Im getting a 500 error.

Dixit

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Sun, 2011-07-17 18:46

hi DixitS!

try the following:
logon to your gallery.
(enable the gallery remote module)
then try to open the gallery_remote2.php page in your browser.
exactly what error message is shown?

btw:
what is the correct url of your gallery?
did you try to enable the debug logging mode of the gallery remote client?
did you change the occurences of /gallery/ to /gallery3/ in your .htaccess file?

br,
the0ne

 
DixitS

Joined: 2009-10-08
Posts: 31
Posted: Mon, 2011-07-18 00:20

Hi the0ne!

When I enable the gallery remote module and hit the page via gallery_remote2.php I get a 500 Internal Server error page on my browser (IE or Chrome).

Here is snippits of my .htaccess

<IfModule mod_rewrite.c>
     Options +FollowSymLinks
     RewriteEngine On
     RewriteBase /gallery3/
     ErrorDocument 404 default
     RewriteRule ^main.php(.*)$ / [QSA,L,R=404]
     RewriteRule ^gallery_remote2.php(.*)$ index.php?kohana_uri=/gallery_remote$1 [QSA,PT,L]
</IfModule>
# Set some reasonable defaults for PHP.  Most of these cannot be set
# inside the script itself.  For hosts that don't have .htaccess
# support but do support per-dir php.ini files, these settings are
# mirrored in php.ini

Havent enabled debug logging in gallery remote client since Im getting the 500 Internal Server error on the browser and the client is getting the same thing.

I can PM you my URL.

Dixit

 
montlo02

Joined: 2011-05-16
Posts: 5
Posted: Mon, 2011-07-18 13:31

Hi theOne !

Thanks for advice ! And sorry, its a mistake, the address is :
http://lesmontagne.toile-libre.org/gallery/

So, I try to access to http://lesmontagne.toile-libre.org/gallery/gallery_remote2.php and I have a 404 error ! Not surprising it doesn't work... I will try to find this file now.

Thanks a lot.

 
montlo02

Joined: 2011-05-16
Posts: 5
Posted: Mon, 2011-07-18 14:47

I find the file in /gallery/modules/remote/patches/ and I copy this file in /gallery/

I have the same problem as DixitS. When I try to access to http://lesmontagne.toile-libre.org/gallery/gallery_remote2.php, I have a 500 error...

And when I try to connect from GR, I have this one :
[img]http://lesmontagne.toile-libre.org/error.jpg[/img]

So I don't know what to do... Can you help me please ? (I join the GR log file)

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Mon, 2011-07-18 19:57

hi montlo02!

please don't copy the file from the patches folder (it's only an old leftover that needs to be cleaned from the module).
all you should need to do is the changes as mentioned in the module's admin page.

br,
the0ne

 
montlo02

Joined: 2011-05-16
Posts: 5
Posted: Tue, 2011-07-19 07:49

Hi theOne!

I don't understand : if I don't copy the gallery_remote2.php on /gallery/, I have a 404 error when I try to connect to http://lesmontagne.toile-libre.org/gallery/gallery_remote2.php, and it's normal, the file doesn't exist... So I can't have a blank page at this address...

What am I suppose to do ? If I do only the changes mentionned by module admin page, GR doesn't work and I have the first message I post...

Thanks again, and sorry for the inconvenience...

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Tue, 2011-07-19 08:21

hi montlo02!

the file doesn't have to exist.
the modification in the .htaccess file is sufficient:

Quote:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /gallery/
ErrorDocument 404 default
RewriteRule ^main.php(.*)$ / [QSA,L,R=404]
RewriteRule ^gallery_remote2.php(.*)$ index.php?kohana_uri=/gallery_remote$1 [QSA,PT,L]
</IfModule>

the line

Quote:
RewriteRule ^gallery_remote2.php(.*)$ index.php?kohana_uri=/gallery_remote$1 [QSA,PT,L]

will tell the web server that for any request to /gallery/gallery_remote2.php it will execute file index.php

don't worry: this ain't black magic but a standard apache feature that is widely used and well documented.

br,
the0ne

 
montlo02

Joined: 2011-05-16
Posts: 5
Posted: Tue, 2011-07-19 12:24

OK! Now I understand.

But we're back to square one...
When I try to connect to http://lesmontagne.toile-libre.org/gallery/gallery_remote2.php : 404 error
When I try to connect from GR :
[img]http://lesmontagne.toile-libre.org/error2.jpg[/img]

.............. What should I do?

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Tue, 2011-07-19 13:51

hi montlo02!

please get your setup fixed.
once you're ready and having problems with the gallery remote module itself i'll be happy to provide further help.

br,
the0ne

 
ozzy68

Joined: 2010-09-08
Posts: 2
Posted: Sun, 2011-08-21 14:41

Hi theOne

I too am having trouble logging on using GR. i have triple checked through the files etc to see if all is spot on with what you have said previously above.
When i type in http://osborneimages.co.uk/gallery/gallery_remote2.php i get the blank page as i should and i know the gallery exists as i have a couple of pictures there and i can browse straight to them with http://osborneimages.co.uk/gallery but when i try to log on using gallery remote with the address http://osborneimages.co.uk/gallery it comes back with cannot find any protocol implementation at this url.

Any suggestions would be very much appreciated.

Ozzy68

 
ehran

Joined: 2007-05-24
Posts: 4
Posted: Sun, 2011-08-21 21:59

hello

ditto...

installed the module, updated the .htaccess and getting an error 500 ...

will be listening to any suggestion :)

http://blog.ehran.com/gallery3/gallery_remote2.php

thanks
ehran

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Mon, 2011-08-22 06:04

hi ozzy68, hi ehran!

both of your galleries return an error 500 when trying to connect using gallery remote:
TRACE|GalComm |tryComm /gallery/gallery_remote2.php: 500
please check your webserver logs while hitting the gallery remote 'login' button and send any useful details.

br,
the0ne

 
sagemaniac

Joined: 2003-03-26
Posts: 47
Posted: Sun, 2011-09-11 15:51

Hi there,
thank you for this module, been waiting for it ;).

I did all changes as mentioned in the module's admin page.

The gallery URL is valid. Manual browser input of
http://www.sumari.de/gallery/gallery_remote2.php
or
http://www.sumari.de/gallery/gallery_remote
results in a white page, as expected.

But when I start Gallery Remote (version 1.5.1-b46 on a MAC) I get the "Gallery Remote can find no protocol ..." error message.
Logs do not show any GR related errors, only a translation scanner error, which I doubt is related:

Quote:
2011-09-11 17:16:35 +02:00 --- error: Translation scanner error. file: modules/moduleupdates/views/admin_moduleupdates.html.php, line: 20, context: array (
0 =>
array (
0 => 307,
1 => 't',
2 => 20,
),
1 => '(',
2 =>
array (
0 => 315,
1 => '"Outbound Status: "',
2 => 20,
),
3 => '.',
)

In my .htaccess I do have the last rewrite block enabled, which removes the /index.php/ from URLs. Commenting it out does not change anything though.

 
sagemaniac

Joined: 2003-03-26
Posts: 47
Posted: Sun, 2011-09-11 21:50

I installed a test gallery on another server - added one photo - installed remote module - and got the same GR error message.

G3 Error logs told me

Quote:
2011-09-11 23:29:50 +02:00 --- error: File not found: gallery_remote2.php
2011-09-11 23:29:52 +02:00 --- error: File not found: main.php?g2_controller=remote.GalleryRemote&g2_form[cmd]=no-op

changed RewriteBase to just "/"

same error - but after closing & restarting & emptying cache in GR, all the sudden GR connected and worked as expected. It also needed a folder, couldn't create the first one in GR.

So, on to the original server...

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Thu, 2011-09-15 17:39

hi sagemaniac!

nice to hear you could solve the problem!
i think to sum up it's best to solve any problems concerning the configuration of the main gallery, the webserver, permissions, database, etc. first and only afterwards try to use gallery remote.
in mostly all cases afterwards gallery remote 's gonna work :)

br,
the0ne

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Wed, 2011-10-05 03:39

Think I found the error for this, although not sure how to fix, or what it impacts...

Basically the git repository is foobar'd - it's not the complete code... so don't get it from git

You need to get the zip or tar.gz from: http://www.t-horner.com/g3_remote

then, you'll need to comment out the following line in 'gallery/modules/remote/libraries/GalleryRemoteReply.php'

if($status!='') $reply->set('status', $status);

change this to:
// if($status!='') $reply->set('status', $status);

After I did this, all worked well, tested and all... no more 500 errors...

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Mon, 2011-10-10 18:41

Hi,

I got a 500 internal Server Error if i try to connect with Gallery Remote 1.5.1-b46

xxx.202.104.43 - - [10/Oct/2011:20:23:29 +0200] "HEAD /bilder/gallery_remote2.php HTTP/1.1" 500 - "-" "Gallery Remote 1.5.1-b46"
xxx.202.104.43 - - [10/Oct/2011:20:23:29 +0200] "GET /bilder/main.php?g2_controller=remote.GalleryRemote&g2_form%5Bcmd%5D=no-op HTTP/1.1" 500 579 "-" "Gallery Remote 1.5.1-b46"

If I take a look into var/log I found a error trace I do not understand.
2011-10-10 20:23:30 +02:00 --- error: ReflectionException [ -1 ]: Class _Controller does not exist
/var/www/virtual/schmu.net/htdocs/gallery3-weiruJHvtfCED/modules/gallery/helpers/gallery.php [ 64 ]
#0 /var/www/virtual/schmu.net/htdocs/gallery3-weiruJHvtfCED/modules/gallery/helpers/gallery.php(64): ReflectionClass->__construct('_Controller')
#1 [internal function]: gallery_Core::private_gallery(NULL)
#2 /var/www/virtual/schmu.net/htdocs/gallery3-weiruJHvtfCED/system/core/Event.php(208): call_user_func_array(Array, Array)
#3 /var/www/virtual/schmu.net/htdocs/gallery3-weiruJHvtfCED/system/libraries/Router.php(160): Event_Core::run('system.post_rou...')
#4 [internal function]: Router_Core::setup(NULL)
#5 /var/www/virtual/schmu.net/htdocs/gallery3-weiruJHvtfCED/system/core/Event.php(208): call_user_func_array(Array, Array)
#6 /var/www/virtual/schmu.net/htdocs/gallery3-weiruJHvtfCED/application/Bootstrap.php(61): Event_Core::run('system.routing')
#7 /var/www/virtual/schmu.net/htdocs/gallery3-weiruJHvtfCED/index.php(102): require('/var/www/virtua...')
#8 {main}

Following files are installed in my module dir:
vu2002@awesome:/var/www/virtual/schmu.net/htdocs$ find bilder/modules/remote/ -type f -exec ls -la {} \;
-rw-r--r-- 1 vu2002 vu2002 1712 2011-06-20 10:21 bilder/modules/remote/libraries/GalleryRemoteReply.php
-rw-r--r-- 1 vu2002 vu2002 5270 2011-06-20 15:34 bilder/modules/remote/views/admin_remote.html.php
-rw-r--r-- 1 vu2002 vu2002 702 2011-06-20 15:28 bilder/modules/remote/patches/htaccess.patch
-rw-r--r-- 1 vu2002 vu2002 531 2011-06-20 15:19 bilder/modules/remote/patches/cookie.patch
-rw-r--r-- 1 vu2002 vu2002 1169 2011-06-20 12:11 bilder/modules/remote/helpers/remote_event.php
-rw-r--r-- 1 vu2002 vu2002 1477 2011-06-20 12:06 bilder/modules/remote/helpers/gallery_remote.php
-rw-r--r-- 1 vu2002 vu2002 75 2011-06-20 16:16 bilder/modules/remote/README
-rw-r--r-- 1 vu2002 vu2002 305 2011-06-20 16:16 bilder/modules/remote/module.info
-rw-r--r-- 1 vu2002 vu2002 1149 2011-06-20 11:53 bilder/modules/remote/controllers/admin_remote.php
-rw-r--r-- 1 vu2002 vu2002 21473 2011-06-29 09:47 bilder/modules/remote/controllers/gallery_remote.php

Because of my install dir "bilder" instead of "gallery" I patched my .htaccess as followed:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /bilder/
ErrorDocument 404 default
RewriteRule ^main.php(.*)$ / [QSA,L,R=404]
RewriteRule ^gallery_remote2.php(.*)$ index.php?kohana_uri=/gallery_remote$1 [QSA,PT,L]
</IfModule>

I have no Idea where to start debugging.

Bye
Thomas

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Mon, 2011-10-10 18:59

hi thomas!

best is to login to gallery and in the same browser window try to access
http://www.schmu.net/bilder/gallery_remote2.php
what is the debug output shown?

br,
the0ne

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Mon, 2011-10-10 21:33

Hi,

I found a conflict with other rewrite Rules in the .htaccess.
If I disable the other rules I get a blanc page.

The apache logs an the Headers show the 500 Error:
Response-Header - http://www.schmu.net/bilder/gallery_remote2.php

Date: Mon, 10 Oct 2011 21:26:33 GMT
Server: Apache/2.2.14 (Ubuntu)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: g3sid=d6d3bb296fd3e9ef525fde4d999add38; expires=Mon, 17-Oct-2011 21:26:33 GMT; path=/; domain=schmu.net
g3sid=f8283cc32d6c4e6bbb54207b49a3379c917cd6ba%7Ed6d3aa296fd3e9ef525fde4d999add38; expires=Mon, 17-Oct-2011 21:26:33 GMT; path=/; domain=schmu.net
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Connection: close
Content-Type: text/html; charset=UTF-8

500 Internal Server Error

If I test the Access to the main.php I will get the default error page.

Now the var/log/ keeps silent.

Any Ideas?

Bye
Thomas

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Tue, 2011-10-11 05:45

hi thomas!

no need to do any testing around main.php as it's not provided by the gallery remote g3 plugin.
currently http://www.schmu.net/bilder/gallery_remote2.php doesn't return an all-white page so definitely the setup is not 100% correct.
i'm personally using .htaccess in both the root www folder and the gallery folder and i had to fiddle around a little to get it to work correctly.

br,
the0ne

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Tue, 2011-10-11 14:56

Hi,

an important hint:
If you test the URL from your Browser, you should not be logged in.

Bye
Thomas

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Tue, 2011-10-11 16:14

Hi,

I have enabled rewrite logging. This looks fine.
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] strip per-dir pre
fix: /var/www/virtual/schmu.net/htdocs/bilder/gallery_remote2.php -> gallery_remote2.php
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] applying pattern
'^main.php(.*)$' to uri 'gallery_remote2.php'
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] strip per-dir pre
fix: /var/www/virtual/schmu.net/htdocs/bilder/gallery_remote2.php -> gallery_remote2.php
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] applying pattern
'^gallery_remote2.php(.*)$' to uri 'gallery_remote2.php'
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (2) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] rewrite 'gallery_
remote2.php' -> 'index.php?kohana_uri=/gallery_remote'
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (3) split uri=index.php?kohana_uri=/gallery_remote -> uri=index.php, arg
s=kohana_uri=/gallery_remote
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] add per-dir prefi
x: index.php -> /var/www/virtual/schm
u.net/htdocs/bilder/index.php
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (2) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] forcing '/var/www/virtual/schmu.net/htdocs/bilder/index.php' to get passed through to next API URI-to-filename handler
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (2) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] trying to replace prefix /var/www/virtual/schmu.net/htdocs/bilder/ with /bilder
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (4) add subst prefix: index.php -> /bilder/index.php
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d4c198/initial] (1) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] internal redirect with /bilder/index.php [INTERNAL REDIRECT]
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d628f8/initial/redir#1] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] strip per-dir prefix: /var/www/virtual/schmu.net/htdocs/bilder/index.php -> index.php
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d628f8/initial/redir#1] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] applying pattern '^main.php(.*)$' to uri 'index.php'
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d628f8/initial/redir#1] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] strip per-dir prefix: /var/www/virtual/schmu.net/htdocs/bilder/index.php -> index.php
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d628f8/initial/redir#1] (3) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] applying pattern '^gallery_remote2.php(.*)$' to uri 'index.php'
2.204.52.246 - - [11/Oct/2011:17:57:08 +0200] [www.schmu.net/sid#7fb365983948][rid#7fb365d628f8/initial/redir#1] (1) [perdir /var/www/virtual/schmu.net/htdocs/bilder/] pass through /var/www/virtual/schmu.net/htdocs/bilder/index.php

I did my test with a browser. Because I do not allow guestaccess to my gallery, I think requesting authentication is a correct behaviour.

If I authenticate as e.g. admin I run into the 500 internal server error.

Bye
Thomas

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Tue, 2011-10-11 16:32

hi thomas!

can you temporarily disable the authentication and retry?

br,
the0ne

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Tue, 2011-10-11 18:11

Hi theOne,

I have disabled the authentication. Now I got a blance page. In the log now a 500 internal server error is displayed directly.

Here the log while trying with a unauthenticated browser:
xxx.202.104.43 - - [11/Oct/2011:19:53:17 +0200] "GET /bilder/gallery_remote2.php HTTP/1.1" 500 20 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"

Here the log while trying with the Gallery Remote fat client.
xxx.202.104.43 - - [11/Oct/2011:19:59:34 +0200] "HEAD /bilder/gallery_remote2.php HTTP/1.1" 500 - "-" "Gallery Remote 1.5.1-b46"
xxx.202.104.43 - - [11/Oct/2011:19:59:34 +0200] "GET /bilder/main.php?g2_controller=remote.GalleryRemote&g2_form%5Bcmd%5D=no-op HTTP/1.1" 404 242 "-" "Gallery Remote 1.5.1-b46"
xxx.202.104.43 - - [11/Oct/2011:19:59:35 +0200] "HEAD /bilder/gallery_remote2.php HTTP/1.1" 500 - "-" "Gallery Remote 1.5.1-b46"
xxx.202.104.43 - - [11/Oct/2011:19:59:35 +0200] "GET /bilder/main.php?g2_controller=remote.GalleryRemote&g2_form%5Bcmd%5D=no-op HTTP/1.1" 404 242 "-" "Gallery Remote 1.5.1-b46"

It seems that the fat client accesses the main.php.

Attached you will find the error message from Gallery Remote.

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Tue, 2011-10-11 18:26

hi thomas!

your problem is the error 500.
only because of that (!) galleryremote tries the alternate main.php which - as expected - is not found.
you need to find the root cause for the error 500 from the apache error log and the php log.

br,
the0ne

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Wed, 2011-10-12 18:12

Hmm I have checked the hole Server and PHP config. I found nothing.
We run PGP in CGI Mode with fast-cgi.

Du you use any special PHP Features or Setting in your module?

Bye
Thomas

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Thu, 2011-10-13 06:05

hi thomas!

no special settings or features other than used by gallery3 are used.
please provide the php error message leading to the error 500.
it's not possible to provide any useful advice without this information.

br,
the0ne

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Thu, 2011-10-13 19:31

Hi theOne,

I can not find any php error message. As you see, if you access the Module-URL there is no output.
I scanned the webserver and gallery logs and can't find a usefull error message.

Any Ideas?

Bye
Thomas

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Fri, 2011-10-14 23:18

Hi theOne,

I invest some time in code debugging and found an error.

In modules/remote/libraries/GalleryRemoteReply.php line 49
"reply" should be replaced by "this" because $reply is not known in this context.

Now if I try to access the URL, the server respose with a 200 and a message like "#__GR2PROTO__ status=104 status_text= " if I am authenticated.

And the gallery fat client connects to the gallery if at least one Album is public.

I wunder that such an error result in a 500 server error and not in a PHP "normal" error

Bye
Thomas

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Sat, 2011-10-15 01:35

Finally... woot, that was it, and now I'm mad at myself for not seeing that. Thanks poggenpower.

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Sat, 2011-10-15 06:26

hi thomas!

thanks for pointing out!
i have updated the archives available for download.

br,
the0ne

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Sat, 2011-10-15 08:44

Have someone an idea, why it throws a 500 internal server error and not a PHP error?

Is reply a reserved word?

Bye
Thomas

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2011-10-15 14:07
poggenpower wrote:
Have someone an idea, why it throws a 500 internal server error and not a PHP error?

The only way to know for sure is check your server's error log (not access log) that if logging is enabled (it is by default) that is the only place server errors (5xx errors) get logged.

Quote:
Is reply a reserved word?

What do you mean?
____________________________________________
Like Gallery? Like the support? Donate now!

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Sat, 2011-10-15 17:57
Quote:
nivekiam wrote:
poggenpower wrote:
Have someone an idea, why it throws a 500 internal server error and not a PHP error?

The only way to know for sure is check your server's error log (not access log) that if logging is enabled (it is by default) that is the only place server errors (5xx errors) get logged.

I have screened all server log, even the stdout/err from the apache. I have configured PHP the write an error log to ensure nothing got lost.
But found no hint.

So I start evil try and error debugging, by disabling line by line in the sourcecode. Found the send-function generates this error if an argument is set. After looking twice at the line of code I found the error.

Quote:
Quote:
Is reply a reserved word?

What do you mean?

Because $reply used in the wrong context. My Idea is, $reply triggers PHP to do something that is not allowed in my environment.

If you research wath kind of code in PHP throws an 500. You will find problem reports with access rights of the filesystem or php-funtionality.

Bye
Thomas

 
designingtime

Joined: 2010-06-04
Posts: 11
Posted: Fri, 2011-10-21 22:58

double post

 
designingtime

Joined: 2010-06-04
Posts: 11
Posted: Fri, 2011-10-21 22:57
poggenpower wrote:
Hi theOne,

I invest some time in code debugging and found an error.

In modules/remote/libraries/GalleryRemoteReply.php line 49
"reply" should be replaced by "this" because $reply is not known in this context.

Now if I try to access the URL, the server respose with a 200 and a message like "#__GR2PROTO__ status=104 status_text= " if I am authenticated.

And the gallery fat client connects to the gallery if at least one Album is public.

I wunder that such an error result in a 500 server error and not in a PHP "normal" error

Bye
Thomas

this is almost identical to where I am at, but I also 'commented out the status line in the remote reply file (which now I have to undo??)

what is the solution here, in plain English please?

how do I fix this error?

I downloaded the latest zip file, do you mean I have to download a 'more recent' file from GIT?

If so, how DO YOU DOWNLOAD something from GIT without downloading the whole repository??

every time I dabble in Gallery, it sends me to the edge of insanity...... it is NOT a user friendly system

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Sat, 2011-10-22 08:36

hi designingtime!

i know that git sometimes can be a pain in the (...), that's why i provide a zip file of the gallery-remote-only package on my website.
please note that i will always keep the zip and .tar.gz archives in sync with the git repo so there's no immediate need for you to have a local copy of the whole gallery-contrib repository.

to update your local gallery-remote module i propose to:
1) download the updated zip file
2) delete the gallery-remote folder from the modules folder
3) unzip the downloaded zip archive there
4) run gallery remote to verify the nasty bug is fixed

br,
the0ne

 
designingtime

Joined: 2010-06-04
Posts: 11
Posted: Sat, 2011-10-22 20:59

thanks for the reply but I had already done this (but yes, did it again just in case)

I am wondering if I should be using the option of PHPNuke under Gallery Type instead of standalone.... is that causing a 500 issue?

if not that... I don't know what it is and am about to give up....

 
poggenpower

Joined: 2003-12-09
Posts: 13
Posted: Sat, 2011-10-22 21:19

Hi,

we are still at try and error level, because nobody can explain the 500 Error cause.

So keep trying ...

Bye
Thomas

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2011-10-22 21:27

I've already stated several times, the ONLY place to find ANY explanation of 500 Internal Server errors is in the web server's error logs (possibly stored under /var/log/apache2/error.log and if you're on a shared server you probably don't have access to that and you'll need to ask your host.

If nothing is getting logged there, then your server needs to be set to log such errors.
____________________________________________
Like Gallery? Like the support? Donate now!

 
designingtime

Joined: 2010-06-04
Posts: 11
Posted: Sat, 2011-10-22 22:25

thanks both of you for the replies - I will investigate on the server then (& nivekiam, I'm sorry to hear you've "stated several times" I know how tiring that must be, almost as tiring as trawling through pages of forum posts ;) - isn't this 2011? why is that still 'the norm'?? alas, I digress.

I'll give an update, either way...

 
axis23

Joined: 2006-10-02
Posts: 8
Posted: Mon, 2011-10-31 18:21

Hello, I have this gallery: www.ostadarskt.org/gallery and I want to upload photos with Gallery remote. I install this module but gallery remote program doesn't recognize subalbums. ¿ Isn't implemented yet ?

Many thanks, for this module

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Tue, 2011-11-01 06:08

hi axis23!

basically subalbum handling is fully implemented.
please try to rename your albums to
test1
|- test2
|- test3
and let me know if subalbums are handled correctly.

br,
the0ne

 
axis23

Joined: 2006-10-02
Posts: 8
Posted: Tue, 2011-11-01 07:26

I found the problem, if directory name and internet address of an album are not the same, the directory tree on Gallery Remote doesn't show all albums.

Many thanks

 
axis23

Joined: 2006-10-02
Posts: 8
Posted: Tue, 2011-11-01 16:15

I don't know if this is correct, but changing your code like this in controller/gallery_remote.php

154c154
< $reply->set('album.name.'.$count, $item->name);
---
> $reply->set('album.name.'.$count, $item->slug);

Gallery Remote program display correct the hierarchy tree of my albums. Please test renaming your albums and test your code.

Many thanks

 
the0ne
the0ne's picture

Joined: 2011-05-02
Posts: 83
Posted: Wed, 2011-11-02 05:52

hi axis23!

for several reasons i think this approach is not the best.
i have sent you a pm with patch code.
please apply and test + share the results here.
thanks in advance!

br,
the0ne