php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73946 tar-based phar error on buildFromDirectory function
Submitted: 2017-01-16 11:05 UTC Modified: 2017-01-16 11:16 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (33.3%)
From: escalle dot emilien at gmail dot com Assigned:
Status: Open Package: PHAR related
PHP Version: 5.6.29 OS: debian 8.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: escalle dot emilien at gmail dot com
New email:
PHP Version: OS:

 

 [2017-01-16 11:05 UTC] escalle dot emilien at gmail dot com
Description:
------------
Hi,

I got an error when using \PharData::buildFromDirectory on a huge directory (608MB) : 

PharException - "tar-based phar "..." cannot be created, header for  file "..." could not be written"

I've checked the free disk space and RAM, everything seems to be ok.
I've delete the file which is specified by the error, but the errors occurs on another file.

The error is not verbose to understand what happens.

Test script:
---------------
$oTar = new \PharData('test_dir/test.tar.gz');
$oTar->buildFromDirectory('/test_dir_huge/'); // /test_dir_huge/ is a direcotry of 608MB
$oTarGz = $oTar->compress(\Phar::GZ);




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-16 11:16 UTC] cmb@php.net
-Package: *General Issues +Package: PHAR related
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Sep 21 17:01:23 2020 UTC