Re: [Fwd: PEAR::Archive_Tar: File limit???]
| From: | vincent at blavet dot net | Date: | Wed, 23 Jul 2003 06:39:51 +0000 |
| Subject: | Re: [Fwd: PEAR::Archive_Tar: File limit???] | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6750@lists.php.net to get a copy of this message | ||
Michael,
Can you please try the same code with some error handling, and give me more
details ?
//create a new archive
$tar = new Archive_Tar("../backup/backup.tar");
$tar->setErrorHandling(PEAR_ERROR_PRINT);
foreach($files as $file) {
if (!$tar->add($file)) die('Error for '.$file.'');
}
You should also be able to directly do :
$tar = new Archive_Tar("../backup/backup.tar");
$tar->setErrorHandling(PEAR_ERROR_PRINT);
if (!$tar->create($files)) die('Error for '.$file.'');
Let me know if you find more points
Thanks,
Vincent
En réponse à Greg Beaver <greg@chiaraquartet.net>:
>
>
> -------- Original Message --------
> Subject: PEAR::Archive_Tar: File limit???
> Date: Tue, 22 Jul 2003 17:18:14 -0800
> From: msmith@prattmuseum.org (Michael Smith)
> To: php-general@lists.php.net
> Newsgroups: php.general
>
> Hi,
>
> I'm using PEAR::Archive_Tar to create a tar backup. I already have all
> my stuff ready in some folders, so this is whats going on:
>
> //we need the files
> $files[0] = "../downloads/";
> $files[1] = "../images/";
> $files[2] = "../pages/";
> $files[3] = "../pages_test/";
> $files[4] = "../sql/";
>
> //create a new archive
> $tar = new Archive_Tar("../backup/backup.tar");
> foreach($files as $file) {
> $tar->add($file);
> }
>
> header("Content-type: application/octet-stream");
> header("Content-Disposition: attachment; filename=backup.tar");
> header("Content-length: " . filesize("../backup/backup.tar"));
> header("Pragma: no-cache");
> readfile("../backup/backup.tar");
> unlink("../backup/backup.tar");
>
> But only the images and pages directory are going into the tar file...
>
> please help!
>
> -Michael
> --
> Pratt Museum IT Intern
> All programmers are playwrights and all computers are lousy actors.
>
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>