Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load Albums #9

Open
ry29 opened this issue Sep 2, 2011 · 2 comments
Open

Unable to load Albums #9

ry29 opened this issue Sep 2, 2011 · 2 comments

Comments

@ry29
Copy link

ry29 commented Sep 2, 2011

Hi,
I added my gallery using the instructions provided. URL is http:///gallery then I placed in my Administrator's credentials. However, I could not retrieve API key.
In the Apache log on the server, I can see the REST url is getting a 403 (permission denied).
- - [01/Sep/2011:22:14:03 -0400] "POST /gallery/index.php/rest HTTP/1.1" 302 363 "-" "ApertureToGallery3ExportPlugin"
- - [01/Sep/2011:22:14:03 -0400] "GET /gallery/rest HTTP/1.1" 403 2 "-" "ApertureToGallery3ExportPlugin"

However, if I get the API key from Gallery itself, and place it in manually, I still can't see the albums (and it doesn't appear to try as the access log doesn't show new entries). I try Add Album, which seems to try to add it:

  • - [01/Sep/2011:22:18:36 -0400] "POST /gallery/index.php/rest/item/1 HTTP/1.1" 302 370 "-" "ApertureToGallery3ExportPlugin"
  • - [01/Sep/2011:22:18:36 -0400] "GET /gallery/rest/item/1 HTTP/1.1" 200 1380 "-" "ApertureToGallery3ExportPlugin"
  • - [01/Sep/2011:22:18:42 -0400] "POST /gallery/index.php/rest/item/1 HTTP/1.1" 302 370 "-" "ApertureToGallery3ExportPlugin"
  • - [01/Sep/2011:22:18:42 -0400] "GET /gallery/rest/item/1 HTTP/1.1" 200 1380 "-" "ApertureToGallery3ExportPlugin"
  • - [01/Sep/2011:22:18:42 -0400] "POST /gallery/index.php/rest/item/1 HTTP/1.1" 302 370 "-" "ApertureToGallery3ExportPlugin"
  • - [01/Sep/2011:22:18:42 -0400] "GET /gallery/rest/item/1 HTTP/1.1" 200 1380 "-" "ApertureToGallery3ExportPlugin"
  • - [01/Sep/2011:22:20:06 -0400] "POST /gallery/index.php/rest/item/1 HTTP/1.1" 302 370 "-" "ApertureToGallery3ExportPlugin"

No longer ran 403 errors, but no album appears in the list, nor in the gallery on the website. I'll see if I can get a tcp trace to help debug this.

Any thoughts on the 403? I searched around, and it seems to plague Gallery Installs. I'm on Gallery 3.0.2, Aperture 3.1.3 and Plugin 1.0.

Thanks!
-Ry

@ry29
Copy link
Author

ry29 commented Sep 2, 2011

Reading more, I suspect the 403 is a configuration problem on my Apache side. However, I confirmed that the iPhoto to Gallery3 plugin works fine against this install. It looks like this when it logs in to retrieve albums:

  • - [01/Sep/2011:22:45:50 -0400] "POST /gallery/rest HTTP/1.1" 200 34 "-" "iPhotoToGallery3"
    • - [01/Sep/2011:22:45:50 -0400] "GET /gallery/rest/tags HTTP/1.1" 200 65 "-" "SCiPhotoToGallery3"
  • - [01/Sep/2011:22:45:51 -0400] "GET /gallery/rest/item/1?type=album&output=json&scope=all HTTP/1.1" 200 1626 "-" "SCiPhotoToGallery3"
    • - [01/Sep/2011:22:45:51 -0400] "POST /gallery/rest/items HTTP/1.1" 200 13521 "-" "SCiPhotoToGallery3"

I'll work on getting a Fiddler-equivalent trace (not sure on OSX, but I'll find out)

@ry29
Copy link
Author

ry29 commented Sep 8, 2011

I was able to see the difference using a http debug tool called Charles. The iPhotoTGallery3 makes a direct post to http:///gallery/rest, sends the credentials and retrieves the api key. However, ApertureToGallery3 makes the initial post to http:///gallery/index.php/rest/index.php/rest which appears to authenticate successfully (according to Charles), g3sid cookie set and json shows the api key. The response from Apache replies with a 302 to go to http:///gallery/rest/index.php/rest, which the plugin follows with a GET request, but that is rejected with a 403.

Is there a way the plugin can hit http:///gallery/rest directly instead of gallery/index.php/rest/index.php/rest ?
The URL I specify in the plugin is simply http:///gallery . I have tried putting /rest or index.php/rest without avail. I could try making an Apache rewrite rule to see if I can intercept it... If the trace files are required, I can email them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant