Server contacted, but gallery not found
drbohner
Joined: 2002-11-22
Posts: 16 |
Posted: Sat, 2003-04-26 15:46 |
Howdy, I am having the same issue as many others - and I am beginning to think that the issue might be security oriented... I have several websites on one server. One site allows Gallery Remote to connect fine, the other site gives me the 'server contacted, but gallery not found...' error. I have used Beyond Compare (scootersoftware) to compare the directories/folders between the two sites - and they are identical. The tool doesn't compare priviledges - so it might wind down to a privs/chmod issue. Can someone provide what special privs are supposed to be applied to specific folders? If anyone else has resolved the issue - PLEASE POST. I am willing to do the programming work to resolve the issue in Gallery Remote - where is the source kept? I need to determine what triggers the error - before I can resolve it. Thanks for your time! Daniel Bohner http://www.existinglight.net |
|
Posts: 93
not sure about fixing the error, but the source can be viewed here:
<!-- BBCode Start --><A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gallery/gallery_remote/" TARGET="_blank">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gallery/gallery_remote/</A><!-- BBCode End -->
or downloaded using instructions at bottom of page here:
<!-- BBCode Start --><A HREF="http://jpmullan.com/galleryupdates/" TARGET="_blank">http://jpmullan.com/galleryupdates/</A><!-- BBCode End -->
be sure to replace the module name "gallery" with "gallery_remote"
ie with unix, i believe the second command should be:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> cvs -z3 -d:pserver:anonymous@cvs.Gallery.sourceforge.net:/cvsroot/gallery checkout gallery_remote </TD></TR></TABLE><!-- BBCode End -->
and the third(although I'm not sure about this one because I don;t use unix often):
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> cd gallery_remote </TD></TR></TABLE><!-- BBCode End -->
for wincvs, using a different module is obvious when looking at the instructions
joel
Posts: 16
Within the GalleryComm2.java code I find the following:
/**
* POSTSs a request to the Gallery server with the given form data. If data is
* not null, a multipart MIME post is performed.
*/
Properties requestResponse( NVPair form_data[], byte[] data) throws GR2Exception, ModuleException, IOException {
// assemble the URL
URL galUrl = g.getUrl();
String urlPath = galUrl.getFile();
urlPath = urlPath + ( (urlPath.endsWith( "/" )) ? SCRIPT_NAME : "/" + SCRIPT_NAME );Log.log(Log.TRACE, MODULE, "Url: " + urlPath );
// create a connection
HTTPConnection mConnection = new HTTPConnection( galUrl );
HTTPResponse rsp = null;
// post multipart if there is data
if ( data == null ) {
rsp = mConnection.Post(urlPath, form_data);
} else {
rsp = mConnection.Post(urlPath, data, form_data);
}
// handle 30x redirects
if (rsp.getStatusCode() >= 300 && rsp.getStatusCode() < 400) {
// retry, the library will have fixed the URL
status(su, "Received redirect, following...");
if ( data == null ) {
rsp = mConnection.Post(urlPath, form_data);
} else {
rsp = mConnection.Post(urlPath, data, form_data);
}
}
// handle response
if (rsp.getStatusCode() >= 300) {
throw new GR2Exception( "HTTP POST failed (HTTP " + rsp.getStatusCode() + " " + rsp.getReasonLine() + ")");
} else {
// load response
String response = new String(rsp.getData()).trim();
Log.log(Log.TRACE, MODULE, response);
// validate response
if ( response.startsWith( PROTOCOL_MAGIC ) ) {
Properties p = new Properties();
p.load( new StringBufferInputStream( response ) );
return p;
} else {
throw new GR2Exception("Server contacted, but Gallery not found at this URL (" + galUrl.toString() + ")");
}
}
}
Notice the last part... If response.startsWith (Protocol_Magic)... I haven't been able to define where the response gets set, within gallery.
Any of the GR Developers wanna shed light?
Daniel
Posts: 16
I am using the XOOPS CMS:
I found where you can turn up the debug log for Gallery Remote (default.properties)... When I set it to 3 (max) I find that the I get redirected to the Not Authorized page...
Here's what you can do to replicate what happens with Gallery's Login..
1) login to Xoops.
2) url = http://yourdomain/modules/xoopsgallery/gallery_remote2.php?cmd=login&uname=Username&password=Password&protocol_version=2.0
This will give you back the parameters that Gallery is expecting.
3) log out of Xoops.
4) url = http://yourdomain/modules/xoopsgallery/gallery_remote2.php?cmd=login&uname=Username&password=Password&protocol_version=2.0
Now you get redirected - because you don't have authority to connect...
Now the question - how can Gallery Remote get the initial authorization to the gallery? Still looking into this - finding it very painful..
Any assistance is very helpfull!
Daniel
Posts: 3
change line 29 and 30 in gallery_remote2.php into
require("init.php");
require("classes/remote/GalleryRemoteProperties.php");
that worked for me
Posts: 16
Turmkater,
Am I good to assume that you are using Xoops?
Daniel
Posts: 1479
I'm not sure if this thread is dealing with the same kind of error as this one, but you may be interested in the what we resolved there...