28, May 2012

On the fly zip, zip empty - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Miscellaneous scripts or snippets (Moderator: Olaf)
Topic: On the fly zip, zip empty
« previous next »
Pages: [1] Print

Author Topic: On the fly zip, zip empty  (Read 1722 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Jul 04, 2008, 11:08:30 am »

Hello Olaf, Hi all

I'm trying to implement your script (PHP5 MacOSX) and it works. The problem is that the archive is empty, perhaps I missed some documentation on folders usage.

This is my structure:

/cascina (the website to backup)
/backupdb (contains mysql dump backup script)
/backupsite (contains createzip,inc.php, run.php and backups folder

This is my code:
Code:
$createZip = new createDirZip;
$createZip->addDirectory('../cascina/');
$createZip->get_files_from_folder('../cascinaselmo', 'backups/');

$fileName = 'backups/cascinaselmo.zip';
$fd = fopen ($fileName, 'wb');
$out = fwrite ($fd, $createZip->getZippedfile());
fclose ($fd);

Thanks in advance for any help.


p.s. for mac users: open your archives with stuffit expander and not with the BOMarchivhelper (the system default) or they wont open
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Jul 04, 2008, 12:15:17 pm »

Hi check also this thread:
http://www.finalwebsites.com/forums/topic/problems-with-downloads-mac-only and the comments on the blog site

I stopped using the script for my own site because I don't have the time to fix the header problem. I use the linux zip function instead.

Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #2 on: Jul 04, 2008, 12:28:08 pm »

Hi Olaf,

the point is that my script works: it creates the file and it can be opened.

But the zipped folder is empty, and I cant find any solutions inside the forum. I think the problem is only the way I specified the source folder.

Can you post some more instructions regarding the folders?

Thanks in advance!
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Jul 04, 2008, 12:48:05 pm »

Hi Olaf,

the point is that my script works: it creates the file and it can be opened.

But the zipped folder is empty, and I cant find any solutions inside the forum. I think the problem is only the way I specified the source folder.

Can you post some more instructions regarding the folders?

Thanks in advance!

sorry I can't help you with the code because the class is not mine (I wrote only the extension)

use the linux zip application and safe hours of time Wink

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7821
Tags : On the fly zip zip empty Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Miscellaneous scripts or snippets (Moderator: Olaf)
Topic: On the fly zip, zip empty
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:09:23 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.