5, September 2008

On the fly zip, zip empty - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ 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 484 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Jul 04, 2008, 12:08:30 PM »

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: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Jul 04, 2008, 01:15:17 PM »

Hi check also this thread:
http://www.finalwebsites.com/forums/topic/problems-with-downloads-mac-only Visit through proxy 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.


Last blog : Is your website is down? Know before your visitors do!
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #2 on: Jul 04, 2008, 01: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: 6309
38674 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Jul 04, 2008, 01: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


Last blog : Is your website is down? Know before your visitors do!
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....

Topic sponsors:
Get a permanent link here for $1.99!


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?
Sep 05, 2008, 05:10:37 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!


Forum Statistics
Total Posts: 36.293
Total Topics: 7.476
Total Members: 3.899
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: speedy5044

35 Guests, 4 Users online :

15 users online today:



Readers

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