Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0

Bug #16963 extractList can't extract zipped files from big tar
Submitted: 2009-12-31 18:04 UTC
From: rumon Assigned: mrook
Status: Closed Package: Archive_Tar (version 1.3.5)
PHP Version: 5.2.5 OS: Windows XP
Roadmaps: 1.3.6    
Subscription  


 [2009-12-31 18:04 UTC] rumon (Rumon Rahman)
Description: ------------ I am regularly extracting specific .gz files from various tar. Average size of tars: 3~4 GB. And, tar contains about 12000~15000 .gz files. However, my script can easily extract files which is around at 7000-8000 serial inside tar. After this, extractList can't find the files. I tried extending memory_limit too, still not solved. I was guessing, it could be problems with extractList for big size tars. Can you please check the issue? Test script: --------------- if (file_exists($filename)) { $tar = new Archive_Tar("$filename"); $tar->extractList(array("/cdrback/$server_name/$date/$server_loc/$part/$e"), "$myloc/","/cdrback/$server_name/$date/$server_loc/$part/"); } else { echo "<br />The file $filename doesn't exist"; } Expected result: ---------------- GSN01_091221204719_2031R.gz MSS01_0912211400_7569A.gz MSS02_0912212300_7233R.gz MSS03_0912212000_7031.gz MSS04_0912212200_3699A.gz MSS05_0912211800_1975R.gz MSS06_0912212000_9438.gz MSS07_0912211900_7619.gz MSS09_0912212000_8776A.gz MSS10_0912211500_6678R.gz MSS11_0912211700_0160.gz MSS12_0912211800_1185A.gz MSS13_0912211900_4528.gz MSS14_0912212000_1488R.gz MSS15_0912211800_6741.gz MSS16_0912211500_9766A.gz MSS17_0912211400_4558A.gz MSS18_0912211800_8384R.gz MSS19_0912211700_8156A.gz MSS20_0912212200_2662.gz MSS21_0912212200_9469A.gz MSS22_0912211900_1868A.gz MSS24_0912211600_9633A.gz VAS03_0912210000_17774A.gz VAS04_0912210000_50061.gz VAS09_20091221_2100A.gz Actual result: -------------- These files are ignored. These exist after 8000 serial inside tar. Extractlist couldn't find these files. MSS15_0912211800_6741.gz MSS16_0912211500_9766A.gz MSS17_0912211400_4558A.gz MSS18_0912211800_8384R.gz : : :

Comments

 [2010-01-04 22:26 UTC] mrook (Michiel Rook)
-Status: Open +Status: Closed -Assigned To: +Assigned To: mrook -Roadmap Versions: +Roadmap Versions: 1.3.6
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2010-01-14 20:37 UTC] rumon (Rumon Rahman)
Until the next release, if someone face the same problem, here is the fix by Micheal: replace the fseek() call in "_jumpBlock" of tar.php with the following line: fread($this->_file, $p_len * 512); ---- PHP & system c fseek() uses signed integers which only go up to 2^31. So, large zipped files, which is over 2.5 gb, can be failed to extract using extractList. Thanks to Micheal for the fix.