I'm poking at gallery_remote.php manually and am puzzled by something. I use the login command and get a SUCCESS back:
POST /gallery/gallery_remote.php HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 56
cmd=login&protocal_version=1&uname=xxxxx&password=xxxxxx
and then send a fetch-albums command:
POST /gallery/gallery_remote.php HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 35
cmd=fetch-albums&protocal_version=1
which returns SUCCESS but doesn't give me a list of albums. I currently have one album defined in Gallery.
Is this a known problem? Am I being stupid about something?
Thanks!
Steve
Posts: 1479
If you're doing this with curl or something, you can't: session information is stored in a cookie, so what happens is the fetch-albums command thinks you're not logged in (my bet).
Posts: 3
Ah, I wondered about that. Makes perfect sense.
I was doing this simply by telneting to my http server and constructing the POSTs by hand. This does suggest a minor bug fix, though: if the session information isn't available then I don't think the fetch-albums command should return SUCCESS. Certainly not a big deal when the remote interface is being used properly! :wink:
Steve
Posts: 1479
This is very true. The new version of the interface: gallery_remote2.php will return more accurate error messages.