Bug #58169 [Csd]: "Number of files in the Phar" limited to 2042

From: Date: Tue, 23 Jan 2018 16:33:29 +0000
Subject: Bug #58169 [Csd]: "Number of files in the Phar" limited to 2042
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213676@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=58169&edit=1 ID: 58169 Updated by: bishop@php.net Reported by: mike at ziebeck dot net Summary: "Number of files in the Phar" limited to 2042 Status: Closed Type: Bug -Package: phar +Package: *General Issues Operating System: Windows XP x64 Pro PHP Version: 5.2.5 -Assigned To: cellog +Assigned To: bishop Block user comment: N Private report: N New Comment: See also https://stackoverflow.com/q/48406219/2908724 Previous Comments: ------------------------------------------------------------------------ [2015-05-28 10:10:13] hanskrentel at yahoo dot de Related To: Bug #53467 ------------------------------------------------------------------------ [2015-05-28 10:09:14] hanskrentel at yahoo dot de Related: Bug #53467: Phar cannot compress large archives (Dec 2010) - https://bugs.php.net/bug.php?id=53467 ------------------------------------------------------------------------ [2008-04-28 04:53:22] mike at ziebeck dot net Well done. I've verified this issue again ... Using win32 snapshot version of PHP 5.2: [Problem fixed] -------------------------------------------------------- php5.2-win32-200804280030.zip pecl5.2-win32-200804280030.zip Using win32 snapshot version of PHP 5.3: [Problem persists] ----------------------------------------------------------- php5.3-win32-200804251230.zip pecl5.3-win32-200804251230.zip * 2042 file limit persists * unlinking the temporary file (see new script) results in: Warning: Permission denied Not tested: win32 snapshot version of PHP 6.0: [no PECL] -------------------------------------------------------- Reproduce code: --------------- <? $pArchive="DataArchive.phar"; $dirName=str_replace(DIRECTORY_SEPARATOR, "/", dirname(__FILE__)); $p=new Phar("$dirName/$pArchive", 0, $pArchive); for($i=0; $i<16*1024; $i++){ echo("\r writing File($i) "); if(!is_dir($fileDir="$dirName/test_data")) mkdir($fileDir, 0777, true); file_put_contents($tmpFile="$fileDir/$i", ""); $p->addFile($tmpFile, $i); //unlink($tmpFile); } echo("\r Written Files($i) \r\n"); ?> ------------------------------------------------------------------------ [2008-04-25 12:50:43] greg at chiaraquartet dot net This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pecl.php.net. In case this was a pecl.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PECL better. we were missing a php_stream_close() in Phar::addFile(), bug is fixed, thanks for the report. ------------------------------------------------------------------------ [2008-04-25 12:17:41] greg at chiaraquartet dot net Hi, I've verified this, but the number varies based on the operating system, for instance, on unix, we're limited to 1018 files before it pukes. We're simply not closing some temporary file handles, I'll try to figure it out. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=58169 -- Edit this bug report at https://bugs.php.net/bug.php?id=58169&edit=1

« previous php.bugs (#213676) next »