奇怪! 当foldername包含“-cache”时,openZip例程失败

The script below handles upload, extraction and transfer of .zip files

I have a strange problem that is occurring on one server (currently only one) in which when the zip file contains a folder with the name "cache", the server resets the connection before the file can be transferred.

Any ideas what could cause this? Changing the folder name to anything that does not contain the word "-cache" fixes the problem.

The problematic foldername is "gravatar-cache"

<?php

function openZip($file_to_open) {
    global $target;
    global $wp_filesystem;
    if(class_exists('ZipArchive'))
    {
        $zip = new ZipArchive();
        $x = $zip->open($file_to_open);
        if($x === true)
        {
            $zip->extractTo($target);
            $zip->close();
            unlink($file_to_open);
        } else {
            die("There was a problem. Please try again!");
        }
    }
    else
    {
    WP_Filesystem();
    $my_dirs = '';
    _unzip_file_pclzip($file_to_open, $target, $my_dirs);
    unlink($file_to_open);
    }
}

if(isset($_FILES['fupload'])) {
    $filename = $_FILES['fupload']['name'];
    $source = $_FILES['fupload']['tmp_name'];
    $type = $_FILES['fupload']['type'];
    $name = explode('.', $filename);
    global $templateName;
    $templateName = strtolower($name[0]);


        // permission settings for newly created folders
        $chmod = 0755;

    // Ensures that the correct file was chosen
    $accepted_types = array('application/zip','application/x-zip-compressed','multipart/x-zip','application/s-compressed','image/jpeg');

    foreach($accepted_types as $mime_type) {
        if($mime_type == $type)
            {
            $okay = true;
            break;
        }
    }

    //Safari and Chrome don't register zip mime types. Something better could be used here.
    $saved_file_location = $target . $filename;

    if (strtolower($name[1]) =='zip')
    {
        if (move_uploaded_file($source, $saved_file_location))
        {
            //unzip_file($saved_file_location, $target);
            openZip($saved_file_location);
        }
        else
        {
        die();
        }
    }
}