Theming: No log in image possible (NC10.01 / Ubuntu 14.04 / PHP5)

Dear all. I’m using Nextcloud 10.01 on Ubuntu 16.04LTS - and so far everything’s fine.
But on another setup I have following problem.

Ubuntu 14.04 PHP5 NC10.01 (fresh Setup of NC). So far so good, but it’s impossible to set a log in image via webinterface. I see no entry in nextcloud.log.

Does anyone has the right tipp??

Thank you

Update: Here’s the apache error.log

[Wed Oct 05 01:55:09.747886 2016] [:error] [pid 1494] [client 84.189.207.172:50124] PHP Parse error:  imagescale(): one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n in /var/www/cloud/apps/theming/lib/Controller/ThemingController.php on line 211

There was a bug report in the past: https://bugs.php.net/bug.php?id=65171, not sure if the fix made it in ubuntu 14.04. If it fails at very large pictures, you can reduce the size of an image for which a thumbnail is created (workaround):

/**  
         * max file size for generating image previews with imagegd (default behaviour)
         * If the image is bigger, it'll try other preview generators,
         * but will most likely show the default mimetype icon
         *
         * Value represents the maximum filesize in megabytes
         * Default is 50
         * Set to -1 for no limit
         */
        'preview_max_filesize_image' => 50,

cc @juliushaertl for debugging since he wrote most of the theming. :slight_smile:

That sounds quite reasonable, the theming source code should not produce such an error message, since the width of the image to resize is hardcoded to 1920px. server/apps/theming/lib/Controller/ThemingController.php at master · nextcloud/server · GitHub

@kangaroo72 is your ubuntu instance up to date? What is the output of php -v ?

Solved … I did the upgrade to 16.04 …

On the long term, that’s probably the best solution. You have the much faster php7.0 and you can directly use all the caching modules (apcu, redis) that come with the distribution.