function uncompress($srcName, $dstName) {
$sfp = gzopen($srcName, "rb");
$dstName = str_replace('.gz', '', $dstName);
$fp = fopen($dstName, "w");
fseek($FileOpen, -4, SEEK_END);
$buf = fread($FileOpen, 4);
$GZFileSize = end(unpack("V", $buf));
while ($string = gzread($sfp, $GZFileSize)) {
fwrite($fp, $string, strlen($string));
}
gzclose($sfp);
fclose($fp);
}
I use this code for uncompressing but It does not work and I get following error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.