Page 1 of 1

Download picture Phoca Gallery

Posted: 17 Mar 2016, 15:06
by webbmary
Hi

At this site http://www.skipperfurniture.dk/index.ph ... 40&lang=da, all of a sudden, the link of downloading the orginal images dosen't work anymore (Error mess: "Can not open this picture because the file is damaged, incorrect or too large."). The thumbnail is working. Anyone who please can give me any tips?

It's in a Joomla 2.5 site and we have Phoca Gallery 3.2.8

Re: Download picture Phoca Gallery

Posted: 18 Mar 2016, 02:30
by Jan
Hi, check the original image on the server - the download goes to original image. :idea:

Check if it is stored on server (not deleted), if the image is not damaged, etc. :idea:

Jan

Re: Download picture Phoca Gallery

Posted: 18 Mar 2016, 16:26
by webbmary
Hi,

I have checked that, for example the product from URL abowe.... the original picture http://www.skipperfurniture.dk/images/p ... ofa-01.jpg works fine.

But NONE downloads work of any products =(

Re: Download picture Phoca Gallery

Posted: 20 Mar 2016, 23:19
by Jan
Hi, I see, I have downloaded both images, one per download button, second directly - both are the same, both have the same size, but the one downloaded by the download button includes on first row an empty space, when I remove it, the image can be displayed correctly.

So seems like the server, before it gives the image for download, write something as output which is then stored in the image first row and which causes the problem with displaying the image.

In this code, there is a download - setting headers for download:
administrator\components\com_phocagallery\libraries\phocagallery\file\filedownload.php

You can see that there is a function: ob_end_clean(); (line 71, 93) - this should clear all output of the server, but seems something on your server writes empty space after this clean :idea: The headers can be changes directly for the server needs, but this just needs to test every possible combination :idea:

Jan

Re: Download picture Phoca Gallery

Posted: 21 Mar 2016, 12:35
by webbmary
Hi Jan and thanks for your answer but I don't know what to do? I'm not sure of what you mean with: "The headers can be changes directly for the server needs, but this just needs to test every possible combination". What can I test to do?

Re: Download picture Phoca Gallery

Posted: 22 Mar 2016, 11:30
by Jan
Hi, there is a specific feature - to be able to download a file and not to display it in browser, specific headers need to be sent by the server. In Phoca Gallery, the common headers techniques are used. So when we need that the server sends the file (image) to users for download, we need to send headers to user's browser. They are called http headers. It can happen, that such header information can be wrongly set by the server (e.g. some information is rendered and it will damage the information of downloaded file). So this is more a question on webhosting provider, if there is something which writes something to the headers and damage it. So what needs to be done:

- The problematic part needs to be found and if e.g. the headers are not working for the server, other header information needs to be set or the error needs to be found

Unfortunately, the only thing I have detected, is, that something on your server writes empty space to the header - so the image file will be corrupted. But this is all I can detect and unfortunately I don't have any other tools how to detect what can be wrong there :idea: and which part makes the empty space :idea:

Jan

Re: Download picture Phoca Gallery

Posted: 24 Mar 2016, 14:02
by webbmary
Hi Jan,

I tried to move the site to an other server and it dosen't work there either. http://kalbynet3.kalbynet.se/~skipper/i ... 35&lang=sv :x

Re: Download picture Phoca Gallery

Posted: 27 Mar 2016, 03:06
by Jan
Hi, testing now and I get the same error - so this can mean, the server has the same configuration like the other (I for know really have no other and better explanation - Phoca Gallery is working since 2007 on many thousands of sites, so I don't expect there is something problematic when downloading the file - the script is standard common script for download). But it seems like something, I really don't know writes something before the download happens - try to, if possible, install pure Joomla! CMS with gallery only - disable all possible plugins, modules and test it with standard template - if this will work, then try to enable other parts of system to know, what can be wrong there :idea:

Jan

Re: Download picture Phoca Gallery

Posted: 29 Mar 2016, 09:36
by webbmary
Hi again Jan and thanks for your answer. I FINALLY found the error. An old version of extstore.com/joomla-extensions/plugins/scroll-to-top. When I installed the latest version it works! :twisted:

Re: Download picture Phoca Gallery

Posted: 31 Mar 2016, 20:14
by Jan
Ok