I have seen only one question on here but it does not answer my question. I am running a typical LAMP server that has the most up to date PHP 5 and MYSQL 5 with Redhat Linux.
I need to find a PHP only solution because my host does not allow me to use shell.
Here is my code that extracts ZIPs that are not passworded from vBulletin uploads to another directory:
if ($_GET['add'] == TRUE){
$zip = new ZipArchive;
$res = $zip->open($SOURCE FOLDER);
if ($res === TRUE) {
$zip->extractTo('$DESTINATION FOLDER/');
$zip->close();
echo 'File has been added to the library successfuly';
//Add a flag to that file to indicate it has already been added to the library.
mysql_query("UPDATE attachment SET library = 1 WHERE filedataid='$fileid'");
} else {
echo 'A uncompression or file error has occured';
}}
There must be some way to do this using just PHP, surely! Thank you.
UPDATE: My host informs me that gzip is installed on the server but not 7-Zip. I am looking into shell access too.