-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Log in image is not showing #2208
Comments
Could you open the web developer tools in your browser and refresh the login page. Are there then any errors listed in the network or console tab of the web developer tools? |
Then try the same on the theming page. Open those tools and then upload the image. Are there any errors then? What image type are you uploading? |
jpg no errors on theming page |
When there is a error 500 there should be something in the nextcloud log. Could you check the |
This is the code (roughly): $newBackgroundLogo = $this->request->getUploadedFile('upload-login-background');
$image = @imagecreatefromstring(file_get_contents($newBackgroundLogo['tmp_name'], 'r'));
if ($image === false) {
return;
}
$image = imagescale($image, 1920);
imageinterlace($image, 1);
imagejpeg($image, $tmpFile, 75);
imagedestroy($image); Weird thing is that the {
"app": "PHP",
"level": 3,
"message": "imageinterlace() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/apps/theming/lib/Controller/ThemingController.php#213",
"method": "POST",
"remoteAddr": "188.192.179.44",
"reqId": "WC-xU4Z3Cu4AAA2-GqcAAAAF",
"time": "2016-11-19T07:29:40+01:00",
"url": "/index.php/apps/theming/ajax/updateLogo",
"user": "ownadmin"
}
{
"app": "PHP",
"level": 3,
"message": "imagejpeg() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/apps/theming/lib/Controller/ThemingController.php#214",
"method": "POST",
"remoteAddr": "188.192.179.44",
"reqId": "WC-xU4Z3Cu4AAA2-GqcAAAAF",
"time": "2016-11-19T07:29:41+01:00",
"url": "/index.php/apps/theming/ajax/updateLogo",
"user": "ownadmin"
}
{
"app": "PHP",
"level": 3,
"message": "imagedestroy() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/apps/theming/lib/Controller/ThemingController.php#215",
"method": "POST",
"remoteAddr": "188.192.179.44",
"reqId": "WC-xU4Z3Cu4AAA2-GqcAAAAF",
"time": "2016-11-19T07:29:41+01:00",
"url": "/index.php/apps/theming/ajax/updateLogo",
"user": "ownadmin"
}
{
"app": "PHP",
"level": 3,
"message": "imagescale(): one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n at /var/www/nextcloud/apps/theming/lib/Controller/ThemingController.php#211",
"method": "POST",
"remoteAddr": "188.192.179.44",
"reqId": "WC-xU4Z3Cu4AAA2-GqcAAAAF",
"time": "2016-11-19T07:29:41+01:00",
"url": "/index.php/apps/theming/ajax/updateLogo",
"user": "ownadmin"
} Any idea @LukasReschke @icewind1991 @juliushaertl ? |
@MorrisJobke No idea why this is failing. @ace0024 Is this only happening with one specific file or with all JPEGs in your setup? |
i tried a few jpegs and png... all the same problem |
Ah there was this report on the forum already: https://help.nextcloud.com/t/theming-no-log-in-image-possible-nc10-01-ubuntu-14-04-php5/3873/2 So this could be an issue with the PHP version: https://bugs.php.net/bug.php?id=65171 PHP documentation on imagescale: http://php.net/manual/en/function.imagescale.php
So my guess is this but is not fixed in your php version PHP 5.5.9-1ubuntu4.20. |
Could we add a workaround for these PHP versions? |
@MorrisJobke Calculating the new height for keeping the aspect ratio and passing it to the imagescale function should be enough i think. |
@MorrisJobke I'll try to reproduce and add a workaround. |
okay thx... wait.. |
Once approved in #2232 this will be merged to master and backported to stable10 so there should be nothing to worry about in the future. |
perfect! Thank you for the grateful support! 👍 |
Thanks a lot @juliushaertl 👍 |
Steps to reproduce
Expected behaviour
i will see the uploaded BG image
Actual behaviour
i can only see the custom color which i can choose in the theming app as BG.
no uploaded BG image !
Server configuration
Operating system:
Ubuntu 14.04.5 LTS
Web server:
apache
Database:
mysql
PHP version:
PHP 5.5.9-1ubuntu4.20
Nextcloud version: (see Nextcloud admin page)
nc 10.0.1
Updated from an older Nextcloud/ownCloud or fresh install:
OC 8.2.5 (stable) -> nextcloud-9.0.54 -> nextcloud-10.0.1
Where did you install Nextcloud from:
https://download.nextcloud.com/server/releases/
Signing status:
Signing status
The text was updated successfully, but these errors were encountered: