Hello/Hi/Greetings,
Trying to troubleshoot an issue with uploading from Shotwell ["forbidden file type"] and I am hitting a wall, so want to turn up logging. This is what I have in local/config/config.inc.php:
$conf['ws_enable_log'] = true;
$conf['ws_log_filepath'] = '/var/www/gallery4/ws_log.log';
$conf['enable_i_log'] = true;
$conf['show_php_errors'] = E_ALL;
$conf['log_level'] = 'DEBUG';
ws_log.log is writable by Apache, but it remains empty.
_data/logs/log_<today>.txt is created when I upload a photo through the web interface. I can see [DEBUG] events when I then view that image and it gets resized. It doesn't ever log anything about ws.php when using Shotwell to upload to it.
Shotwell is able to create a new category but cannot upload any images.
I had a similar issue a few months ago which was due to PHP file size limits: http://piwigo.org/forum/viewtopic.php?id=26563 but I have tested with a 50kB JPEG and it still doesn't work [max upload is 64MB].
According to Apache logs, POST /gallery4/ws.php always gives a 200/OK. Apache error log is silent. What can I do to get ws.php to log something, anything at all?
Piwigo version: Piwigo 2.8.5
PHP version: PHP: 5.6.26-1
MySQL version: 5.7.16-1
Piwigo URL: http://ale.cx/gallery4
Offline
troffasky wrote:
$conf['ws_enable_log'] = true;
$conf['ws_log_filepath'] = '/var/www/gallery4/ws_log.log';
$conf['enable_i_log'] = true;
where did you find this config specifications?
i have just checked my "/include/config_default.inc.php" and I did not found those config specifications.
Offline
I almost certainly found them from googling. You won't find them in your config_default.inc.php as they're not defaults.
enable_i_log:
http://piwigo.org/doc/doku.php?id=user_ … es_missing
ws_enable_log:
Looks like this vanished between 2.7.4 and 2.8:
https://fossies.org/diffs/piwigo/2.7.4_ … -diff.html
so no wonder nothing gets written to /var/www/gallery4/ws_log.log.
I am not sure how I found this parameter - only 8 hits on google for it.
Now what? Surely that isn't just the end of logging for web services? It must have been replaced with some other logging function, but how to enable it?
Offline
something about this
http://piwigo.org/doc/doku.php?id=dev:c … 2.8#logger
but no idea how to use it. seems the logs are stored in _data/logs
Offline
Yes, I have logs in _data/logs but nothing relating to ws.php, only where I have uploaded a file through a browser. That logger documentation looks to me like it is for developers, not end-users.
Offline
troffasky wrote:
That logger documentation looks to me like it is for developers, not end-users.
yes but you can add your own spinet code using this logger method to get whatever you want as data to debug
the ws methods are very to spot so you can edit them easily
If you coded a good way to log ws actions, you can submit us a Pull Request
Here are some examples https://github.com/Piwigo/Piwigo/search … p;q=logger
Offline
How exactly are you uploading from shotwell?
Offline
Select image(s), click Share. It goes through the motions and the category is created but no images are uploaded and no error is reported.
However...
I tested regalandroid and was able to upload images, so web services appear to be OK. I had a look through the logs and the last time it was working for me I was using Shotwell 0.22. I downgraded Shotwell from 0.25 to 0.22 and it works!
On the Shotwell bug tracker there was a bug recently fixed regarding Piwigo export:
https://bugzilla.gnome.org/show_bug.cgi?id=776664
so I will focus my efforts there.
Offline
Using snapshot.debian.org I have installed various versions of Shotwell and determined that 0.24.0 worked and 0.25.1 doesn't.
Tested uploading the same tiny JPEG to the same category with each version.
Packet capture shows 0.25 sends "Accept-Encoding: gzip, deflate" as part of the POST but 0.24 doesn't. This doesn't seem a likely culprit. Further digging in the packet capture leads me to believe that Shotwell 0.25 just doesn't POST the image - the Content-Length is only 733 bytes, and that causes Piwigo to generate a "forbidden file type" response. The Content-Length when posting the same file with 0.24 is ~27kB.
I will open a bug with shotwell.
Offline
OK, so I am not sure how, but this basically seems to be working now. All I've done is attempt to git bisect Shotwell, get nowhere doing so, rebuild it, and it now it works with the absolute latest version of Shotwell and every version in between.
Offline