Search…

X3 Photo Gallery Support Forums

Search…
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Error on preview image

08 Jul 2016, 07:19

Hello

Yesterday have I uploaded some pictures from my Holyday and after upload on some pictures become an error picture see attachment.

And when am trying to preload site object it say that can’t write to ../content/site.joson .
Attachments
Imagevue error X3 v0.18.1.PNG
Imagevue error X3 v0.18.1.PNG (8.3 KiB) Viewed 2987 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Error on preview image

08 Jul 2016, 09:56

netopir wrote:Yesterday have I uploaded some pictures from my Holyday and after upload on some pictures become an error picture see attachment.
Galaxy/Android smartphone? I did some research, and it seems this is a new PHP GD image-resize issue related to images from some specific new smartphones. See these posts:
https://bugs.php.net/bug.php?id=72404&edit=3
http://stackoverflow.com/questions/3533 ... ntial-jpeg
https://github.com/owncloud/core/issues/21873

Apparently, the issue can be fixed by adding the following line to your php.ini file:
Code
gd.jpeg_ignore_warning=1
If you don't have access to edit php.ini, you can try to add the following code into /app/parsers/slir/index.php on line 2:
Code
ini_set('gd.jpeg_ignore_warning', 1);
From http://php.net/manual/en/image.configuration.php
netopir wrote:And when am trying to preload site object it say that can’t write to ../content/site.joson .
This is unrelated. You mean it worked before? It basically means that the PHP script does not have permission to write to that file. Log in by FTP and check if file exists and is writeable, and if the "content" folder is writeable. If you have a link, I can check diagnostics.
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: Error on preview image

08 Jul 2016, 14:48

You have already the login data from the past.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Error on preview image

09 Jul 2016, 01:37

netopir wrote:You have already the login data from the past.
For FTP? I found login to panel in a previous PM, but not FTP. Help me help you by being more specific: 1) FTP 2) Url to where I can see the issue 3) Answering my question if it was a samsung/galaxy type phone.

This is not an issue native to X3, but related to your server and a specific obscure camera type.
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: Error on preview image

09 Jul 2016, 02:46

Yes its a Samsung Galaxy Note 4. The FTP login will i send you. And i try whit your code in /app/parsers/slir/index.php buth the same. The galeri is /portfolio/2016/igrane/
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Error on preview image

10 Jul 2016, 07:18

Ok, so I did some research ...

First of all, why are you uploading >1MB images without resizing? Not beneficial for the visitor to load images of that size, and if you use the resizer on upload, the images work fine (see link in private message). Effectively, this is the simple solution.

But just to backtrack to the original issue: This is a PHP "bug", as emphasized in a link posted earlier:
https://bugs.php.net/bug.php?id=72404&edit=3

It is already solved in PHP 7.1.0:
Version Description
7.1.0 The default of gd.jpeg_ignore_warning has been changed from 0 to 1.
On most servers, including yours, one is not allowed to change this in runtime:
Code
ini_set( 'gd.jpeg_ignore_warning', true );
Thus, the code would need to be added to your php.ini file, which you only apply if you control the server, or can request it from your host. Server would also need to be restarted:
Code
gd.jpeg_ignore_warning = 1;
But of course, this becomes arbitrary if the simple solution is to resize images on upload or optionally upgrade server to PHP 7.1.0.
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: Error on preview image

10 Jul 2016, 14:43

Thanks for the help and info , will contact the host to edit php.ini file and ask for the update to 7.1.0 curently is 7.0.6.