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!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
The following code (run from a shared linux/apache web server) fails at the end of the download with a "source file could not be read" error at the client.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Setting type to "application/octet-stream" or "encoding/x-compress" also yields read errors when a content length header is sent, and yields an invalid archive for some users when length is not set.
Setting type to "application/gzip" gets rid of the error report when length is set but yields an invalid zip.
Could anyone please suggest what might be going on?
Before being ftp'd to the server, the file is 7,532,284 bytes. A valid archive.
Downloaded from the server to our test machines _without_ the length header, the result file is 7,534,429 bytes long and opens correctly. The extra 2145 bytes in the download is the generated HTML code of the PHP download page. On some users' boxes, however, a download without the length header truncates to about 1.2MB.
Downloaded to our test machines _with_ the length header, the file is 7,501,994 bytes long, 30290 bytes shorter than the original, and generates an "unexpected end of archive" error from winrar.