Esempio n. 1
0
DUPX_Log::Info("LOG FILE 644:\t" . var_export($GLOBALS['CHOWN_LOG_PATH'], true));
DUPX_Log::Info("BUILD NAME:\t{$GLOBALS['FW_SECURE_NAME']}");
DUPX_Log::Info("REQUEST URL:\t{$GLOBALS['URL_PATH']}");
$log = "--------------------------------------\n";
$log .= "POST DATA\n";
$log .= "--------------------------------------\n";
$log .= print_r($POST_LOG, true);
DUPX_Log::Info($log, 2);
//====================================================================================================
//UNZIP & FILE SETUP - Extract the zip file and prep files
//====================================================================================================
$log = "\n********************************************************************************\n";
$log .= "ARCHIVE SETUP\n";
$log .= "********************************************************************************\n";
$log .= "NAME:\t{$_POST['package_name']}\n";
$log .= "SIZE:\t" . DupUtil::readable_bytesize(@filesize($_POST['package_name'])) . "\n";
$log .= "ZIP:\t{$zip_support} (ZipArchive Support)";
DUPX_Log::Info($log);
$zip_start = DupUtil::get_microtime();
if ($_POST['zip_manual']) {
    DUPX_Log::Info("\n** PACKAGE EXTRACTION IS IN MANUAL MODE ** \n");
} else {
    if ($GLOBALS['FW_PACKAGE_NAME'] != $_POST['package_name']) {
        $log = "\n--------------------------------------\n";
        $log .= "WARNING: This package set may be incompatible!  \nBelow is a summary of the package this installer was built with and the package used. \n";
        $log .= "To guarantee accuracy the installer and archive should match. For details see the online FAQs.";
        $log .= "\nCREATED WITH:\t{$GLOBALS['FW_PACKAGE_NAME']} \nPROCESSED WITH:\t{$_POST['package_name']}  \n";
        $log .= "--------------------------------------\n";
        DUPX_Log::Info($log);
    }
    if (!class_exists('ZipArchive')) {
Esempio n. 2
0
 DupUtil::log("DOC ROOT 755:\t" . var_export($GLOBALS['CHOWN_ROOT_PATH'], true));
 DupUtil::log("LOG FILE 644:\t" . var_export($GLOBALS['CHOWN_LOG_PATH'], true));
 DupUtil::log("BUILD NAME:\t{$GLOBALS['FW_SECURE_NAME']}");
 DupUtil::log("REQUEST URL:\t{$GLOBALS['URL_PATH']}");
 DupUtil::log("--------------------------------------");
 DupUtil::log("POST DATA");
 DupUtil::log("--------------------------------------");
 DupUtil::log(print_r($POST_LOG, true));
 //====================================================================================================
 //UNZIP & FILE SETUP - Extract the zip file and prep files
 //====================================================================================================
 DupUtil::log("{$GLOBALS['SEPERATOR1']}");
 DupUtil::log('UNZIP & FILE SETUP');
 DupUtil::log("{$GLOBALS['SEPERATOR1']}");
 DupUtil::log("PACKAGE:\t" . $_POST['package_name']);
 DupUtil::log("SIZE:\t\t" . DupUtil::readable_bytesize(@filesize($_POST['package_name'])));
 $zip_start = DupUtil::get_microtime();
 if ($_POST['zip_manual']) {
     DupUtil::log("\n-package extraction is in manual mode-\n");
 } else {
     if ($GLOBALS['FW_PACKAGE_NAME'] != $_POST['package_name']) {
         DupUtil::log("WARNING: This Package Set may be incompatible!  \nBelow is a summary of the package this installer was built with and the package used. To guarantee accuracy make sure the installer and package match. For more details see the online FAQs.  \ncreated with:   {$GLOBALS['FW_PACKAGE_NAME']}  \nprocessed with: {$_POST['package_name']}  \n");
     }
     $target = $root_path;
     $zip = new ZipArchive();
     if ($zip->open($_POST['package_name']) === TRUE) {
         $zip->extractTo($target);
         DupUtil::log("INFORMATION:\t" . print_r($zip, true));
         $close_response = $zip->close();
         DupUtil::log("ZIP CLOSE: " . var_export($close_response, true));
     } else {