How do I unzip files on a remote server?

  • mmmwowmmm
  • Novice
  • Novice
  • mmmwowmmm
  • Posts: 22

Post 3+ Months Ago

My website is hosted at godaddy.com, and I am in the process of uploading about 40,000 small files onto their server. I'm using an FTP program, and it's taking forever.

I know there is way to upload a single zip file and then unpack it on the server, but I have not been able to figure it out.

I've gone through this again and again at webmasterworld, but no one will give me a simple step-by-step answer. They say things like "you have to run 'man unzip' at the command line", and then I ask what that means and they tell me something else that means nothing to me.

Eventually I figure out that I can use a command line in my FTP program, but when I type in "man unzip" nothing happens. At all.

So I explain this to the people on the forum, and they say that I should download "putty", and that should work (but only if my hosting service supports SSH, whatever that is), so I find "putty" and download it, but it doesn't work either. It takes me a while to figure this out, because "putty" is not really a "user-friendly" program - it's one of those programs written for people who already know what they're doing. I don't really know what I'm doing.

So I go back to webmasterworld and explain that this isn't working either. Isn't there a simple A-B-C-1-2-3 way to do this? It can't be that hard, right?

The response I get: "Maybe you should write a custom script to execute the unzipping process."

It's really frustrating.

And the thing is, I know that when someone finally does give me the answer I'm looking for, it's going to be something very simple.

So please - if there's someone out there who can just give me a plain-language "step 1, step 2, step 3" explanation on how to do this, I'd be extremely grateful.

Thanks,
Phil
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6810
  • Loc: Martinsburg, WV

Post 3+ Months Ago

I don't know if this will help you or not but my webhost uses cpanel to manage the domain and when I am in the file manager (this is where you can upload, copy, delete and move files) I have an option to unzip uploaded zip files.

I don't know if godaddy offers this but it is worth looking into.
  • mmmwowmmm
  • Novice
  • Novice
  • mmmwowmmm
  • Posts: 22

Post 3+ Months Ago

Thanks, grinch. Actually, godaddy doesn't use cpanel, they use "PhpMyAdmin" for their control panel. It has a simple FTP client, but no way to unzip files...
  • winnie
  • Born
  • Born
  • winnie
  • Posts: 1

Post 3+ Months Ago

I know this issue it is getting on my nerves too. Godaddy doesn't give ssh, no cpanel, the misery... :x

I've started with ZipDeploy since my first website hosted by yahoo : same problem: ftp, phpmyadmin, no real
control panel... So what I do, is create a Zip archive of my multiple files and unzip it remote with this software. Actually I'm replicating my Joomla installs with it (you can also crerate a Zip on server and download it)

here's the link : http://ftp-unzip.com/ZipDeploy/
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Does this make any sense to you ?

http://scripts.ringsworld.com/affiliate ... b.php.html

Code: [ Select ]
<html>
<head><title>unzip</title>
<style>.err{color:#900;font-weight:bold;}</style>
</head><body>
<?php
    if(empty($_GET['archives'])){die("Missing archive list</body></html>");}
    $archive = explode(",", $_GET['archives']);
    $at = count($archive);
    if($at < 1){die("Missing archive list</body></html>");}
    
    require_once('pclzip.lib.php');
    
    for($i=0; $i<$at; $i++) {
        $zipfile = new PclZip($archive[$i]);
        if ($zipfile -> extract() == 0) {
            echo '<div class="err">Error : ' . $archive[$i] . '<br/>' . $zipfile -> errorInfo(true) . '</div>';
        }else{
            echo '<div>Extracted : ' . $archive[$i] . '</div>';
        }
    }
?>
</body></html>
  1. <html>
  2. <head><title>unzip</title>
  3. <style>.err{color:#900;font-weight:bold;}</style>
  4. </head><body>
  5. <?php
  6.     if(empty($_GET['archives'])){die("Missing archive list</body></html>");}
  7.     $archive = explode(",", $_GET['archives']);
  8.     $at = count($archive);
  9.     if($at < 1){die("Missing archive list</body></html>");}
  10.     
  11.     require_once('pclzip.lib.php');
  12.     
  13.     for($i=0; $i<$at; $i++) {
  14.         $zipfile = new PclZip($archive[$i]);
  15.         if ($zipfile -> extract() == 0) {
  16.             echo '<div class="err">Error : ' . $archive[$i] . '<br/>' . $zipfile -> errorInfo(true) . '</div>';
  17.         }else{
  18.             echo '<div>Extracted : ' . $archive[$i] . '</div>';
  19.         }
  20.     }
  21. ?>
  22. </body></html>
  • crazzyDemon
  • Beginner
  • Beginner
  • User avatar
  • Posts: 55

Post 3+ Months Ago

Do you have SSH access to your host account if yes
i can give you an instractions step-by-step how unzip files with ssh
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

crazzyDemon wrote:
Do you have SSH access to your host account


mmmwowmmm wrote:
My website is hosted at godaddy.com

...

Thanks,
Phil


http://help.godaddy.com/article.php?art ... opic_id=80
  • johnbc
  • Born
  • Born
  • johnbc
  • Posts: 1

Post 3+ Months Ago

if using linux / PHP
make php file of following:

<?php system('unzip zipFileName.zip'); ?>

and run from browser.
It will expand on the server (and save bandwidth).
  • murcielagossi
  • Proficient
  • Proficient
  • User avatar
  • Posts: 457

Post 3+ Months Ago

Try running this PHP script provided that you change filenames and server directories.
(i.e. Replace 'test.zip' with 'yourzipfile.zip' and 'destination/dir/' to '/www/whateveryoursiteis/directory')

PHP Code: [ Select ]
<?php
 
$zip = new ZipArchive;
 
if ($zip->open('test.zip') === TRUE) {
 
    $zip->extractTo('/my/destination/dir/');
 
    $zip->close();
 
    echo 'ok';
 
} else {
 
    echo 'failed';
 
}
 
?>
  1. <?php
  2.  
  3. $zip = new ZipArchive;
  4.  
  5. if ($zip->open('test.zip') === TRUE) {
  6.  
  7.     $zip->extractTo('/my/destination/dir/');
  8.  
  9.     $zip->close();
  10.  
  11.     echo 'ok';
  12.  
  13. } else {
  14.  
  15.     echo 'failed';
  16.  
  17. }
  18.  
  19. ?>


P.S: This function will overwrite destination files with the same name.

Good Luck!
  • starlight36
  • Born
  • Born
  • starlight36
  • Posts: 1

Post 3+ Months Ago

PHP
GZIP
ASP
WEBSHELL
RAR.EXE
ZIP
  • murcielagossi
  • Proficient
  • Proficient
  • User avatar
  • Posts: 457

Post 3+ Months Ago

Since you don't have SSH access you pretty much have to use PHP, (i.e. my other post or find some "PHP unzipping script" of your own)
  • compaqras
  • Newbie
  • Newbie
  • compaqras
  • Posts: 8

Post 3+ Months Ago

crazzyDemon wrote:
Do you have SSH access to your host account if yes
i can give you an instractions step-by-step how unzip files with ssh


do you mind if you give instructions to me, man; i have same problems, and i have ssh too. just don't know how to unzip or zip it. if you have other commands please list it too.
bye
  • Kevin Monk
  • Born
  • Born
  • Kevin Monk
  • Posts: 1
  • Loc: London, UK

Post 3+ Months Ago

johnbc wrote:
if using linux / PHP
make php file of following:

<?php system('unzip zipFileName.zip'); ?>

and run from browser.
It will expand on the server (and save bandwidth).


That works perfectly. Thanks John.

Simple. Concise. Would be a 1-2-3 steps except there's only about 1 step.
  • fionab
  • Born
  • Born
  • fionab
  • Posts: 1

Post 3+ Months Ago

I seem to missing something all I get returned when I run this is the following: Archive: site-localhost-20070922-100224.zip
What else do I need to get it it run?
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

Kevin Monk wrote:
johnbc wrote:
if using linux / PHP
make php file of following:

<?php system('unzip zipFileName.zip'); ?>

and run from browser.
It will expand on the server (and save bandwidth).


That works perfectly. Thanks John.

Simple. Concise. Would be a 1-2-3 steps except there's only about 1 step.


It doesn't work for me :shock:
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

fionab what exactly isn't working ?, there's at least two methods in this thread you could be using. :scratchhead:

bogey your hosting account most likely has the "system" function disabled, alot of hosts do that because of security concerns, it could also be somthing like the server not having "unzip" availabe.
You'ld have to try another "system" command for somthing simple like getting the system date or pinging Google to find out.
  • alvini11
  • Born
  • Born
  • alvini11
  • Posts: 1

Post 3+ Months Ago

johnbc wrote:
if using linux / PHP
make php file of following:

<?php system('unzip zipFileName.zip'); ?>

and run from browser.
It will expand on the server (and save bandwidth).


it worked fine on the main directory but on subfolder say just
"Archive: joomlafile.zip"

Any thought please?
  • JonHull
  • Born
  • Born
  • JonHull
  • Posts: 1

Post 3+ Months Ago

After driving myself crazy I found out the GoDaddy provides a way to unzip your files. I copied and modified this info from another forum I found somewhere on the net.

Following these steps:


FTP the zipped folder to your GoDaddy Web hosting account.
*
Log into your GoDaddy account
*
Click on “My Hosting Accounts” (the link name might change over time)
*
Open the “Hosting Manager” for the hosting account that is hosting ProductCart
*
Under the “Content” section, click the “File Manager” icon.
*
Assuming you have uploaded the “.zip” file to the root, select it by using the check box on the left, then click on “Unarchive” at the top. In the window that is shown to you, leave “Select Destination” as is and don't check “Overwrite Existing Files”. The File Manager will unzip the files. The process will take around 30 seconds.
*
You should now see a folder called “#########” in the root.

Go back to the root, select the “#######” folder again by checking the check box on the left, then click on “Permissions” at the top. On the window that is shown to you ('Set permissions for selected folders'):
o
Inherit = unchecked
o
Read = checked
o
Write = checked
o
Reset all children to inherit (All subdirectories will be reset to inherit from current directory) = checked
*
Click “OK” and the File Manager will set Folder Permissions for you.
  • neens_wa
  • Born
  • Born
  • neens_wa
  • Posts: 1

Post 3+ Months Ago

Sorry kids - please diregard, Seems that uninstalling and installing worked, and the plugin is fine.

I feel like such a dolt, but I know if I'm going to master this, I'll have to do soem serious digging, and ultimately (like now) ask some really basic questions.. (like now). Hoping benevolence is still in the air... Jon posted a very nice comment here about Godaddy allowing the upload of a zip file.

I upload the plugin zip file on godaddy, and when I go to my root directory, it doesn't display. Am I missing something?

Post Information

  • Total Posts in this topic: 19 posts
  • Users browsing this forum: No registered users and 20 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.