![]() |
|
#1
|
||||
|
||||
How to offer .tar.gz file downloads?The problem: I am trying to write a PHP script that allows me to easily manage all my MySQL databases and tables from one place.
Unlike phpmyadmin, it will 'dump' (backup) the databases, tar it and then finish it off with a slight dose of 'gzip'. So far everything works perfectly. Now I want to be able to download the gzipped files from a list on the page, the script contains the following header statements: PHP Code:
I have to do it this way since the files are located above the WWW root. With the version of Microsoft's Internet Explorer that I use (v.6), it adds a number everytime I download the file. e.g. sitedb[1].tar.gz The item in bold is what MSIE adds to the downloaded file name. The script/download works beautifully with Mozilla or Opera, so I am a little confused... I must admit that this is the first time I am attempting something like this; so all I have to-date, is a few lines of code I gathered from elsewhere. I hope someday, someone reading this, will be able to help me out. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
||||
|
#2
|
||||
|
||||
|
I'm probably off the beaten track here, but check out this and see if past half way down is relevant at all.http://store.sun.com/docs/sunstore_f...e_buying.jhtml
Internet exporer does the same with cookies too. I had a fairly long search, but to no avail is there somewhere that I could test it out on my IE6 and see if I get similar results. |
|
#3
|
||||
|
||||
|
I appreciate the help Rob but I don't think that was it. This is about manipulating the headers being sent out by the script - wrong headers, wrong results.
The page I am testing is LIVE behind a passworded area, now containing live backups, so I cannot offer a test link right now - not to mention that it wouldn't be too difficult to cut N paste the code above and test it yourself trying to download a dummy .tar.gz file on your server. For all the webmasters who don't have shell access (Telnet/SSH) to their server, a script like this is precious... __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#4
|
||||
|
||||
|
Another poor effort...probably
http://aspn.activestate.com/ASPN/Pyt...mimetypes.html |
|
#5
|
|||
|
|||
|
I think that that is just a silly thing that IE does, due to the way it handles it's cache. Mabye send the nocache header too?
This is a good tool to check headers, courtesy of the good man Delorie www.delorie.com GF |
|
#6
|
||||
|
||||
|
I added the following headers and still no change infact files are now corrupt when downloaded.
PHP Code:
Any other ideas? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#7
|
||||
|
||||
|
Did you ever fix this?
|
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading from file | jmenendezr | C++ Forum | 2 | 26-Feb-2006 17:00 |
| Limited file size.... | lament | Apache Web Server Forum | 2 | 31-May-2004 14:35 |
| Before posting a web hosting offer or ad - PLEASE READ | admin | Web Hosting Advertisements & Offers | 0 | 19-Sep-2003 11:41 |
| How to search a huge text file for data? | JdS | MySQL / PHP Forum | 7 | 27-May-2003 10:27 |
| How Do i get php to find out the file type of a file for me? | viperman95833 | MySQL / PHP Forum | 2 | 08-Mar-2003 10:48 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The