download ZIP-files

  • Posts: 10
  • Thank you received: 0
12 years 11 months ago #32892

There's another problem. I am aware that this topic has been discussed earlier in the forum, but there is something that I do not get!

When a customer buys a zip file, the downloaded file can't be unzipped, the program claims that the file cannot be recognized as an archive file. According to the earlier discussions on this, the problem should be that the server uses wrong MIME types or that it uses GZIP.

Now I have tried this :
Copied the zip file from Hikashop's safe folder to an accessible folder. After that I download the file, using my browser, by entering the adress of the file. And there are no problems with the downloaded file. If the problem should be server related, I suppose that I would encounter it in this case too?

To me it looks as if the download process of Hikashop makes the file unuseable.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32907

When you download the file via HikaShop, it's possible that the gzip compression can be done by joomla if you activated the gzip compression in the configuration of joomla, which would then corrupt the file. So you should check that this option is turned off.

It can also come from your server. When you download the file via HikaShop, the file type is a php file because HikaShop checks that the person has access to the file, before reading the file and sending it to the browser. But when you download the file directly, the file type is a zip. On some servers, there are some "optimisations" in place which automatically gzip the response to the browser if the file type is php. In such cases that would also corrupt the file.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
12 years 11 months ago #32912

I just checked that GZip is turned off in my Joomla install.

If the download file is .php, changing the mime type for .zip won't make much difference i guess.

I suppose that setting mime type for php to octet-stream would make all pages unavailable.

So I think that I must see if GZIP is enforced by the server somehow. Unless someone has a better suggestion.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32914

Yes, that's where I would look in your case.

We use HikaShop on our own website to sell HikaShop itself and we use that exact feature to deliver the packages which are also in zip. The files do not come out corrupted. So it's definitely not a problem in HikaShop.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
12 years 11 months ago #32925

Just wondering:

Does it give any meaning in relation to this, that
Registered PHP streams is set to : https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip

I am not that much of a php wizard that I can see if this setting is relevant?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32926

That's not relevant.
The problem should be in either a .htaccess at the root of your website or in the httpd.conf of apache.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum