Page 1 of 1

Using a script to unzip a tarball for CMSMS installation

Posted: Wed Oct 10, 2007 4:29 pm
by kendo451
For obvious reasons it is far superior to use wget to put the cmsms tarball on the server and then untar it using tar -zxf.

The problem with uploading the uncompressed files using FTP is that there is a much higher chance of file corruption and since CMSMS has so many tiny files, it ends up taking forever to upload it.

However, since some clients have hosting without SSH access, I was wondering if there is a way to write a php script that will unzip the tarball on the server.

Step 1: Upload the tarball using FTP - no problem, no script required here.

Step 2: Run tar -zxf on the tarball to explode it in the right place.  Need a php script for that, if it's even possible.

I tried searching using "tar" but the search function on the forums finds partial words and tar is in so many words that the results were worthless...

Thanks,
Ken Griffith

Re: Using a script to unzip a tarball for CMSMS installation

Posted: Wed Oct 10, 2007 4:37 pm
by calguy1000
php has built in zip functionality, and built in ftp functionality (if the host hasn't disabled it).  So in 2.0 we're planning on using a liteweight installer script that then ftp's the .zip (or .tar.gz) from the cms server, expands it, and then procedes with the install.

Re: Using a script to unzip a tarball for CMSMS installation [semi-solved]

Posted: Thu Oct 11, 2007 1:05 am
by kendo451
Cool!

Now I just need to crack the books and write a PHP unzip script one for my own use until then...

Re: Using a script to unzip a tarball for CMSMS installation [semi-solved]

Posted: Fri Oct 12, 2007 6:04 pm
by Pierre M.
Hello all !
calguy1000 wrote: php has built in zip functionality, and built in ftp functionality (if the host hasn't disabled it).  So in 2.0 we're planning on using a liteweight installer script that then ftp's the .zip (or .tar.gz) from the cms server, expands it, and then procedes with the install.
Very cool. One other product does this. I hope there won't be some CPU/time limit breaking the expand process.
kendo451 wrote: Now I just need to crack the books and write a PHP unzip script one for my own use until then...
Why not contribute this to the 2.0 devteam ? soon rather than "then" ;-)

Pierre

Re: Using a script to unzip a tarball for CMSMS installation

Posted: Sun Oct 14, 2007 12:59 am
by kendo451
I'd love to contribute, but I would be out of my league.  Still, I'll find something to contribute eventually...

Re: Using a script to unzip a tarball for CMSMS installation

Posted: Sun Oct 14, 2007 3:18 pm
by kermit
Pierre M. wrote:
I hope there won't be some CPU/time limit breaking the expand process.
I don't think server loads will be much of an issue for a wget-extract addition to the CMSMS install routine...  i think it'd be a lot easier on the server than an FTP upload of 1500 files totaling nearly 9 megabytes... 2 seconds to download (at 10mbit, for example), and a mere fraction of a second to extract (if the web server hardware is worth anything).

Until then..... Many hosting providers offer a web-based control panel and file manager that supports archive decompression, and some of those also support wget-ing files from remote hosts. What sucks is that some of these don't support overwriting on extract (or copy) which means upgrades still have to be done the old fashioned way (the diff updates come in handy here).

If you do have to FTP install, and are only needing us-EN language files; you can strip out the additional languages and cut your upload by about a third.