Announcement

#1 2017-01-17 14:01:22

bcatelin
Member
London, UK
2017-01-17
5

Digikam piwigo plugin connection issue

Hi,

I have been trying to use digikam (5.2, and now 5.3 on mac OS) to connect to my piwigo. it just provides me with random errors.
from the web server log files I sometimes see 301 errors, sometimes 404 errors. I am not sure in which case I see which error.

to investigate the error I have created an account (webmaster access) and configured digikam piwigo plugin to connect to http URL. Here is what I see from my laptop (wireshark capture):

POST /photos/ws.php HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: ezEwNGYyMjdjLWU4MjMtNDI2Zi1hODlhLTZmMTVlNmY2NTNhMH0=
Content-Length: 58
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,*
User-Agent: Mozilla/5.0
Host: catelin.net

password=xxxxxx&method=pwg.session.login&username=digikamHTTP/1.1 404 Not Found
Server: nginx
Date: Tue, 17 Jan 2017 12:28:44 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Vary: Accept-Encoding
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Link: <https://catelin.net/wp-json/>; rel="https://api.w.org/"
Content-Encoding: gzip

If I change the URL for the demo piwigo one I receive a proper 'wrong credentials' kind of error,  instead of this 404 (or 301) error, so I assume it is a problem related to my server/config.

any clue?

Thanks

Piwigo version: 2.8.5 (problem was there in previous versions too, however I haven't written them down).
PHP version: 5.5 (I've tried 5.6 too)
MySQL version:
Piwigo URL: http://catelin.net/photos

Offline

 

#2 2017-01-19 14:36:41

bcatelin
Member
London, UK
2017-01-17
5

Re: Digikam piwigo plugin connection issue

I have installed piwigo on a local server and found similar kind of behaviour, here is an example:
POST /piwigo/ws.php HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: e2IyZmFlZDZmLWY5YzAtNDVmZS1hYzBmLTdlMWQ1ZWQ2MTczOX0=
Content-Length: 60
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,*
User-Agent: Mozilla/5.0
Host: mn.local

password=zfzefezfez&method=pwg.session.login&username=piwigoHTTP/1.1 302 Found
Date: Thu, 19 Jan 2017 13:16:15 GMT
Server: Apache
Location: https://mn.local/piwigo/ws.php
Content-Length: 272
Content-Type: text/html; charset=iso-8859-1
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://mn.local/piwigo/ws.php">here</a>.</p>
<hr>
<address>Apache Server at mn.local Port 80</address>
</body></html>

that time with an error 302 though. do note that whether I type the wrong or right password I see an error 302, both in the tcpdump and in apache logs.

I guess I should go to digikam forum instead, right? what do you guys think?

Offline

 

#3 2017-01-22 02:47:20

erAck
Member
2015-09-06
114

Re: Digikam piwigo plugin connection issue

HTTP status code 302 is not an error (neither is 301), it is a permanent URI redirection (301 is temporary redirection). See https://en.wikipedia.org/wiki/HTTP_302 and https://tools.ietf.org/html/rfc2616#section-10.3.3.
Check your server configuration or .htaccess for active redirects.
If nothing happens after this response then it looks like the client doesn't handle the response, i.e. by requesting the POST with the corrected location (here https://mn.local/piwigo/ws.php).

Offline

 

#4 2017-01-22 07:28:23

bcatelin
Member
London, UK
2017-01-17
5

Re: Digikam piwigo plugin connection issue

Well, that' why I have installed piwigo on another server, wondering if there was some configuration issue with my server (hosted by Arvixe). so I have installed it on a mac OS server (with default settings of whatever Apple chose as default config).
the client posts to the correct address (/photos/ws.php for arvixe instance, and /piwigo/ws.php for the local instance).
Since there is nothing in my server config, including the htaccess files, that would trigger a 302 I am rather puzzled into why such an return code - ok, you don't want me to use the term 'error' ;) - would be sent back to the client.
in any case, since ws.php is working, I assume this is a problem with the client then. I am going to open a thread on digikam forum.

Offline

 

#5 2018-02-23 00:00:19

bcatelin
Member
London, UK
2017-01-17
5

Re: Digikam piwigo plugin connection issue

I have decided to give it another try.
I'm now on digikam 5.8 (for mac) with kipi5.2. if I post to piwigo.org/demo/ws.php I receive an incorrect username error, which is expected. if I send it to my own instance of piwigo I still have this 'not found' error.
My piwigo is up to date and I have tested its ws.php, everything just works.
I'm puzzled...

Offline

 

#6 2018-03-13 13:08:05

bcatelin
Member
London, UK
2017-01-17
5

Re: Digikam piwigo plugin connection issue

I am now trying from digikam 5.8 for Linux and have the same problem. I tried using shotwell and it works fine, so it looks like it is a problem with digikam plugin.

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact