If Cpanel decompress won't overwrite files

If you want to upload the D7RC2 zip file to your server and decompress it on the server, you may have problems with some versions of Cpanel.  In some versions of Cpanel, existing files will not be overwritten with the new ones.  If you have this problem, try this:

Create a file named unzizp.php and place the following code in the file:

<?php

$file = $_GET['file'];

if (isset($file))
{
echo "Unzipping " . $file . "<br>";
system('unzip -o ' . $file);
exit;
}

$handler = opendir(".");

echo "Please choose a file to unzip: " . "<br>";

echo '<FORM action="" method="get">';

$found = FALSE;

while ($file = readdir($handler))
{
if (preg_match ("/.zip$/i", $file))
{
echo '<input type="radio" name="file" value=' . $file . '> ' . $file . '<br>';
$found = true;
}
}

closedir($handler);

if ($found == FALSE)
echo "No files ending in .zip found<br>";
else
echo '<br>Warning: Existing files will be overwritten.<br><br><INPUT type="submit" value="Unzip!">';

echo "</FORM>";
?>


Place this file, along with the D7 archive, in your sites base directory, then go to yoursite.com/optional-path/unzip.php 

Follow prompts.  Unzipped files will overwrite existing files.


My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 27 Nov 2009

That helps.

Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net
Quote · 29 Nov 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.