download file type changing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
J_Type
Forum Newbie
Posts: 3
Joined: Fri Sep 23, 2005 3:31 pm

download file type changing

Post by J_Type »

I have a download for a .tgz on my site but when it pops up it is downloading as a .tar file. Anyone know why this is happening?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

code? browser? someone farted? :? I think we need to know some more info..
J_Type
Forum Newbie
Posts: 3
Joined: Fri Sep 23, 2005 3:31 pm

Post by J_Type »

PHP, ie, *pfft* oops!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I figured it involved PHP.. but that doesn't tell me anything more like what's involved at hand..
J_Type
Forum Newbie
Posts: 3
Joined: Fri Sep 23, 2005 3:31 pm

Post by J_Type »

I dont know what additional information to provide.

Code: Select all

<a href="files/myFile.tgz">download</a>
This pops up a file download box...

Do you want to open or save this file?

Name : myFile.tar
Type : Tar archive

OPEN SAVE CANCEL

Why does it download as a tar, when the file is a .tgz? Any idea?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

this very likely has nothing to do with your page code but your browser and the "default" handling program associated with it.. it may automatically gunzip the file... if the server mistakenly marks the download as gzcompress encoding without compressing it again, it will be decompressed automatically by most browsers...
Post Reply