Unzipping at the server

Having trouble installing serendipity?
Post Reply
carl
Regular
Posts: 18
Joined: Sat Apr 22, 2006 12:53 am
Location: Barbary Coast, California

Unzipping at the server

Post by carl »

Hello,
Wondering if it's possible to upload the zipped file to the server and unzip it there?

This would greatly cut down on the FTP'ing time.

Thanks...carl
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Unzipping at the server

Post by garvinhicking »

Hi!

Because of security issues, unzipping via PHP at the server is problematic, since it could place "ZIP bombs" there and also requires an unzip tool.

So...no, there's no possibility sadly. If you have SSH access, you can download plugins this way. :)

And of course you can use the Spartacus plugin, which downloads all required files on its own with no interaction reqiurements. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

On the other hand, that's how I do my updates. Since my directory names differ from the standard installation, I unzip the distro, rename the directory, rezip it, and load my customized zip file (actually a tar.gz) to the appropriate directory. I also write and upload a quick PHP script like this:

Code: Select all

<?php
echo 'Unpacking Serendipity...';
echo '<pre>';
$result = system('tar -xvzf my_customized_archive.tgz', $retval);
echo '</pre><br>
<hr/> result: ' . $retval;
?>
Then I delete the archive and script. That's because there's always the danger, like Garvin said, of someone else running my script with his own archive.

So this will never be part of the official distribution; even if it's a remote possibility, it would be a huge problem. And the directory naming could change on each server, so it's a minor programming challenge, too. But you can do it yourself and trade a bit of bandwidth for some server CPU.
Judebert
---
Website | Wishlist | PayPal
carl
Regular
Posts: 18
Joined: Sat Apr 22, 2006 12:53 am
Location: Barbary Coast, California

Post by carl »

OK, thanks. Wasn't aware of the security issues. I got the idea when I installed HUGE Gallery2.

They have something called a "pre-installer" which you upload and then it gets the zip at the source, unzips it and brings up the install wizard.

The whole thing took about 5 minutes.

Thanks...carl
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

rather than unzipping you can use SVN.

using a shell account, go to the directory where you want to install Serendipity and issue the following command.

Code: Select all

svn checkout svn://svn.berlios.de/serendipity/trunk 
svn will download all the current s9y files and put them into the correct directory structure.

it essentially "ftp" and "unzips" from your server, using your server's connection not your client PCs connection.

the neat thing is you can update simply by using

Code: Select all

svn update
The only problem is it puts the files in a subdirectory called /trunk
can someone help with how to redirect the output?
gw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, you can checkout like this:

Code: Select all

svn checkout svn://svn.berlios.de/serendipity/trunk/ .
At least I think that's it. :)

Regards,
garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

garvin,

if you do this in the directory /myblog/

it puts s9y into /myblog/trunk/

how do you redirect to put it into /myblog/ ?
gw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Then do this:

Code: Select all

cd /
svn checkout svn://svn.berlios.de/serendipity/trunk/ ./myblog/
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

thanks.
gw
Post Reply