467,917 Members | 1,352 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,917 developers. It's quick & easy.

gzopen auto-tar on Unix, not on Windows

Hi all,
I've got a problem with this script

$uncompressed_bytes="texttext\ntexttexttexttext\nt exttext";

$compressed_file=gzopen("myfile.txt.gz", "w9");
gzwrite($compressed_file, $uncompressed_bytes);

Pretty easy, isn't it?

This code works as expected on my Windows box, and produces a good .gz
file, but when I run it on my freeBSD-based server I get a .gz,
containing a .tar (named "myfile.txt"), containing the actual

Why? How can I prevent the tar to be created? I just want a .gzipped
textfile with no tar!

Sep 9 '08 #1
  • viewed: 2230
1 Reply
Ok, it was mod_defalate fault, gzipping a gzipped file: adding the
gzip format from the exclusion list solved the issue.
Sep 10 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Manlio Perillo | last post: by
1 post views Thread by Lew | last post: by
20 posts views Thread by Vijay Kumar R. Zanvar | last post: by
5 posts views Thread by maya | last post: by
22 posts views Thread by nospam_news | last post: by
2 posts views Thread by Piotr K | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.