|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-22 18:25 UTC] greg at chiaraquartet dot net
[2008-03-22 20:41 UTC] sfox@php.net
[2008-04-25 12:57 UTC] greg at chiaraquartet dot net
[2008-04-26 09:06 UTC] sfox@php.net
[2008-04-29 05:27 UTC] sfox@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
Description: ------------ I'm seeing extra characters stuffed into the end of files 'tarred' using ext/phar (both Phar and PharData). I don't _think_ this is normal because tar -xf complains about it when run directly: C:\sandbox\php5\Debug_TS>tar -xf myphar.phar.tar tar: Unexpected EOF on archive file tar: Error exit delayed from previous errors Zip's fine, I can't tell about Phar but it appears OK. Reproduce code: --------------- <?php $fname = dirname(__FILE__) . '/myphar.phar.tar'; $phar = new Phar($fname); $phar->setAlias('myphar'); $phar['index.php'] = '<?php echo "hello world\n"; ?>'; $phar['bulk.txt'] = str_repeat('a', 8000); $bulk = file_get_contents('phar://myphar/bulk.txt'); var_dump(strlen($bulk)); system("tar -xf $fname"); $bulk = file_get_contents('bulk.txt'); var_dump(strlen($bulk)); ?> Expected result: ---------------- int(8000) int(8000) Actual result: -------------- int(8000) int(9216)