By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,304 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,304 IT Pros & Developers. It's quick & easy.

gzopen auto-tar on Unix, not on Windows

P: n/a
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
Share this Question
Share on Google+
1 Reply

P: n/a
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.