Page 1 of 1

Unzipping at the server

Posted: Sun Apr 23, 2006 10:38 pm
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

Re: Unzipping at the server

Posted: Sun Apr 23, 2006 10:59 pm
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

Posted: Sun Apr 23, 2006 11:19 pm
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.

Posted: Mon Apr 24, 2006 12:25 am
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

Posted: Thu May 04, 2006 11:24 pm
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?

Posted: Fri May 05, 2006 10:01 am
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

Posted: Fri May 05, 2006 3:42 pm
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/ ?

Posted: Fri May 05, 2006 4:49 pm
by garvinhicking
Hi!

Then do this:

Code: Select all

cd /
svn checkout svn://svn.berlios.de/serendipity/trunk/ ./myblog/
Regards,
Garvin

Posted: Fri May 05, 2006 9:36 pm
by gwilsonmail
thanks.