gzopen auto-tar on Unix, not on Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dr. Gianluigi Zanettini, CEO [MegaLab.it]

    gzopen auto-tar on Unix, not on Windows

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

    $uncompressed_b ytes="texttext\ ntexttexttextte xt\ntexttext";

    $compressed_fil e=gzopen("myfil e.txt.gz", "w9");
    gzwrite($compre ssed_file, $uncompressed_b ytes);
    gzclose($compre ssed_file);

    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
    myfile.txt

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

    Thanks!
  • Dr. Gianluigi Zanettini, CEO [MegaLab.it]

    #2
    Re: gzopen auto-tar on Unix, not on Windows

    Ok, it was mod_defalate fault, gzipping a gzipped file: adding the
    gzip format from the exclusion list solved the issue.

    Comment

    Working...