[Checkout Download] can't download ZIP file

TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-02-27 05:50

Everything is working except the actual file download. I can go all the way through the checkout and paypal process (using sandbox) but when I click the "Continue" link to download the ZIP file I get an error saying the file cannot be downloaded. Anybody have any ideas? Are there any permissions I need to look into?

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-02-27 06:08

Just to add a little more info, apparently the ZIP file is being created because I see a ZIP file in the /g2data/tmp that is named after the order number. And when I FTP it and open it up, it does indeed have the JPG file inside. So, I can say for sure the ZIP file is being created in a temp location but something is failing after that.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-02-27 06:33

I confirmed that each time I click the button to download the ZIP file, a ZIP file gets created in the /g2data/tmp directory. For example: 105.zip However, when I click the Continue... link I get an error that the file cannot be downloaded. After getting this error I immediately check the tmp directory and the ZIP file is gone. Any ideas?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-02-27 07:32

Where's the technical info you are asked to provide when opening a new thread? What's in your server error log?

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-02-27 08:01

Sorry, here's the system info...

Quote:
Gallery URL = http://photos.timidsky.com/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.2.3 (CentOS)
Database = mysqli 5.0.22, lock.system=flock
Toolkits = Exif, Getid3, LinkItemToolkit, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux rhino.hostrack.com 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686
Default theme = ebony
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1)
Rows in GalleryAccessMap table = 14
Rows in GalleryAccessSubscriberMap table = 23
Rows in GalleryUser table = 3
Rows in GalleryItem table = 21
Rows in GalleryAlbumItem table = 20
Rows in GalleryCacheMap table = 0

As for errors, there's nothing in the recent event log in gallery other than failed email attemps with my temporary testing account with sandbox. As for errors on my web hosting logs, I haven't seen anything in the error log via my web hosting control panel. I do see plenty of things in the access log, but the error log has not had an entry in many hours and I've had plenty of failed download attempts since the last error entry. For example, I see these entries in my access log...

Quote:
71.175.2.121 - - [26/Feb/2009:23:48:32 -0800] "GET /main.php?g2_view=core.ItemDeleteJs&g2_lang=en_US HTTP/1.1" 200 978 "http://photos.timidsky.com/main.php?g2_controller=checkoutdownload.BuildDownload&g2_transactionId=111&g2_verify1=1235718560&g2_verify2=14054476149a791a0489b08.55253145&g2_authToken=7119b5748624" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1)"

I've attached a screen shot of the error I receive in Internet Explorer when I choose "Open" or "Save" after clicking the Continue... link.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-02-27 19:12

have you tried a different browser?

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-02-27 19:52

No, I've only tried IE so far but I have tried it from multiple computers and set the security to low. But I assume you aren't suggesting IE is the problem, but rather the possibility of a setting in IE? I think trying from multiple computers more than likely rules that out.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-02-27 20:03

OK, so I just tried with Firefox and it works!! Any ideas why that is? I'm glad it's at least working with another browser but since IE is the most widely used browser I need to ideally get it working with it (and ideally without requiring customers to be checking settings they have no idea how to check assuming it's a settings issue).

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2009-02-28 13:28

Try with different versions of IE.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Sat, 2009-02-28 21:19

All computers I tried were running IE6 SP3. I just tried a computer running IE6 SP2 and same problem. I will try IE7 with all the latest updates shortly (after one of my computers finishes updating). However, I hope this is part of a troubleshooting process. Any version of IE6 or IE7 would probably be the most commonly used browsers by customers and I can't be telling them they need to have a specific version in order to download their product.

Thanks

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Sat, 2009-02-28 22:29

I just tried with IE7 with all the most recent updates and it works. Now that we've determined that Firefox 3 and IE7 work, is this really the expectation? That IE6 just doesn't work? I've done tons of searches on this forum and can't find anybody else having this issue with checkout download.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Tue, 2009-03-03 03:37

Is the expectation that IE6 doesn't work with Checkout Download? And if so, am I really the first person to bring this up? Anybody have any ideas at all? It seems like it's something simple that could be changed to fix this problem.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-03-03 08:51
Quote:
Is the expectation that IE6 doesn't work with Checkout Download?

No, there's no such expectation. I have verified and can confirm that checkoutdownload does work correctly with IE6.

You'll need to do some detailed debugging with something like Fiddler, probably, to determine the cause of the problem on your website.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Tue, 2009-03-03 17:57

OK, I'll see what I can find. But do you have any thoughts at all as to where you'd look first? Something on the web server side (web hosting side) or a permissions issue or a file that is out of date or something like that? At this point I'm not necessarily looking for the answer, but rather I'm just looking for anything that might pop into your head to check if you were having this problem. It just seems this is a very specific problem. It works with Firefox and it works with IE7 but it doesn't work with three different computers running IE6 (1 SP2 and 2 SP3). That is quite specific, actually.

Thanks again.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-03-03 18:04

I'll pm you a link with a download from my website (which works ok in my install of IE6) and if you do likewise with one that doesn't work we can compare notes.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-03-03 18:08

Actually - it only works for me in IE6 if you save the file then open it from explorer. If you click "open" from the file download dialogue box it doesn't work.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Wed, 2009-03-04 23:04

The link you sent to me via PM works!! So that's really odd! If I didn't already know that IE7 and Firefox were working I would be checking permissions on my website right now. The fact that it is working via your link using "my" IE6 (so we know it's not an issue with my workstations) means that there is something different on my website that is only affecting IE6. Does this trigger any ideas? If not, then I guess I'm off to see what I can dig up.

Thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-03-04 23:08

It's important to put all the steps to the solution in the thread - assuming the thread reaches one. It's not "clutter" at all. If you hadn't posted this (which you had sent to me by pm) then if this thread finishes here, which it's quite likely to, nobody else would know whether this was a server-side or client side problem. As it is, it's likely to be a server side issue at your end.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Wed, 2009-03-04 23:27

I understand what you are saying and I agree. I'm just saying I wouldn't have abandoned this thread one way or another but I realize you have no way of knowing that. :) If I don't find a solution (and stop working towards one) I will post that. So anyway, I found something that looks similar...

http://bytes.com/groups/php/554529-internet-explorer-6-refusing-let-me-download

I've searched several files but can't find any reference to session_start() or anything similar. I do see where I could change the Content-Type but I'm not sure I'd want to do that. Am I barking up the wrong tree here? If not, do you have an idea where I need to look? I do assume this shouldn't be a code issue, however. It's just that this particular problem sounded so similar.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-03-04 23:58

Gallery doesn't use php's session handling and never calls session_start(), so I think that's a red herring.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Thu, 2009-03-05 23:56

I've run Fiddler with both IE6 and Firefox. The results (saved to a txt file) look almost exactly the same even though IE6 errors out when trying to save to disk and Firefox saves the ZIP just fine. I can see the ZIP file within the session text for both IE6 and Firefox! So, the ZIP is getting to the computer, yet IE6 errors when trying to save it. It's almost like it's downloading it and then discarding it before you can ever get a chance to save it. But as we know, this didn't happen when I tested via another Gallery website on this same computer with IE6. What gives? :) IE6 either is discarding the file before I can save it OR it doesn't like the format of the file (not likely) and this only happens from my website, not another website.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-03-06 01:08

the zip file from my website was using the nested folders setting. Is that set on yours?

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-03-06 02:17

I've tried it both ways with the same results. And unfortunately my web hosting provider isn't giving me a lot of help since they feel there's no way it's a server problem, that it has to be a local problem and they tested it themselves but only with IE7 (which I already told them works). Apparently they don't have access to IE6 which I find hard to believe. They could if they wanted to. Of course, I know that the same IE6 can indeed work because it worked on your site. That doesn't prove it's a server problem, it could be a problem with the Gallery installation that somehow just affects IE6. I love really specific problems like this. It seems like the solution should be obvious but so far it's not.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-03-06 09:00

What happens if you save the file with IE7 then drag'n'drop it onto an IE6 window? does it unzip?

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Fri, 2009-03-06 18:53

Yes, which of course pretty much rules out the possibility that IE6 doesn't like the format. :)

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Mon, 2009-03-09 19:16

I'm fresh out of ideas on this. I will be sure to update this thread if I find a solution. And I'll be checking from time to time to see if anybody has any ideas.

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Tue, 2009-03-10 17:27

OK, I couldn't stay away for long. :) alecmyers, could you tell me what the Cache-Control and Pragma settings are for PHP on your website when you run the PHP Info in the Gallery Support? This is what it says for me...

Cache-Control no-store,no-cache,must-revalidate,post-check=0,pre-check=0
Pragma no-cache

I have no idea if this has anything to do with my problem but when you google all the relevant key words for this issue I get a lot of discussion forum hits that talk about these settings.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-03-10 20:05

It has this:

Cache-Control	no-store,no-cache,must-revalidate,post-check=0,pre-check=0
 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Tue, 2009-03-10 21:11

I managed to find a way to get IE6 to download the ZIP files. By changing the following in the FetchDownload.inc file...

$phpVm->header('Content-Type: application/octet-stream');

(changed to)

$phpVm->header('Content-Type: application/zip');

While this is now working in IE6, I can't help but think there's a good reason for it being set to octet-stream and not zip. Maybe you can clue me in on that. I haven't tested with any other browsers yet to see if they still work.

Does this give you any ideas as to what the problem might be? I had already determined that the ZIP was getting to my computer with IE6 by using Fiddler but for some reason IE6 was not handling it properly (even though a ZIP downloaded successfully with Firefox could be opened in IE6 no problem).

UPDATE: Although IE6 is downloading the file, it's apparently corrupted and won't open. So, obviously this is not a solution, but it proves IE6 on my computer(s) can download files via my website using Checkout Download. I'm not sure how much this helps, but...

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-03-10 21:20
Quote:
Maybe you can clue me in on that.

No, sorry - I've no idea. I didn't write any of that bit of code.

 
cbuxton5200

Joined: 2009-12-22
Posts: 2
Posted: Tue, 2009-12-22 04:10

I too am having this problem, is there any solution or new ideas? I would really like to use this for my customers to download their finished pictures, but this is just not working. What do others to do have people download pictures from Gallery2?

 
TakeFlight

Joined: 2009-02-27
Posts: 19
Posted: Tue, 2009-12-22 04:23
cbuxton5200 wrote:
I too am having this problem, is there any solution or new ideas? I would really like to use this for my customers to download their finished pictures, but this is just not working. What do others to do have people download pictures from Gallery2?

I have never found a solution to this problem and (for now) I have given up on this project. I may revist at some point. Hopefully somebody else will see this that has any ideas. If I ever do find a solution to this problem I will definitely post it here.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2009-12-22 06:22

@cbuxton: I'm afraid it works perfectly for me, which makes it impossible for me to help. If you spend some tech. time debugging the problem in detail (don't assume it's the same issue as anyone else has, even if the symptoms are initially the same) and can let me know what you find out that would be helpful.