Bug #18895 [Opn->Fbk]: ->extract() fails without throwing exception; ->listContent() returns int(0)
| From: | mrook@php.net | Date: | Thu, 05 Apr 2012 09:21:31 +0000 |
| Subject: | Bug #18895 [Opn->Fbk]: ->extract() fails without throwing exception; ->listContent() returns int(0) | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8517@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=18895&edit=1
ID: 18895
Updated by: mrook@php.net
Reported By: matthew at slyman dot org
Summary: ->extract() fails without throwing exception;
->listContent() returns int(0)
-Status: Open
+Status: Feedback
Type: Bug
Package: Archive_Tar
Operating System: Linux
Package Version: 1.3.7
PHP Version: 5.2.12
Roadmap Versions:
New Comment:
-Status: Open
+Status: Feedback
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PEAR.
Previous Comments:
------------------------------------------------------------------------
[2012-02-16 18:45:22] mrook
Not entirely sure what you want me to do about this, GeoLiteCity.dat.gz
is not a valid
TAR archive?
------------------------------------------------------------------------
[2011-10-08 19:27:47] matthewslyman
Description:
------------
http://geolite.maxmind.com/download/geoip/database/GeoLite
City.dat.gz
There is nothing wrong with the archive from Maxmind - I
have no problems extracting the contents of the archive on MS
Windows 7 using the free 7Zip software. I'm not getting any
PHP errors or warnings with my code. According to 7Zip, the
extracted file name is:
"GeoLiteCity.dat"
Having downloaded this file into a temporary directory (PHP
has no problems writing to this directory); I am attempting to
use Archive_Tar to extract the file into the same directory (or,
into a new subdirectory to be created by the extract()
function). Either way, it silently fails without throwing an
exception.
Test script:
---------------
$archive=New Archive_Tar($compressed_file_path,'gz');
$archive->extract(dirname($compressed_file_path));
var_dump($archive->listContent());
Expected result:
----------------
1. $archive should be created.
2. Compressed files in archive should be extracted to destination
directory. (Otherwise, ->extract() should throw an exception.)
3. Output should contain list of file names in Array() from
listContent() function.
Actual result:
--------------
1. Successfully created the $archive. (NO problem here.)
2. ->extract() silently fails! File is NOT extracted to destination.
3. var_dump() echoes the following output: "int(0)"
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=18895&edit=1