php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43093 Zip File Size Problem
Submitted: 2007-10-24 12:05 UTC Modified: 2007-12-11 01:00 UTC
Votes:13
Avg. Score:3.9 ± 0.9
Reproduced:12 of 12 (100.0%)
Same Version:2 (16.7%)
Same OS:6 (50.0%)
From: alan at dunns dot co dot uk Assigned: pajoye (profile)
Status: No Feedback Package: Zip Related
PHP Version: 5.2.4 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-10-24 12:05 UTC] alan at dunns dot co dot uk
Description:
------------
using zip->open(), zip->extractTo on a zip file less than (approx) 250mb works fine. Using it on a file size over 250mb it fails.



Reproduce code:
---------------
$zip = new ZipArchive;
$zip->open("/srv/ftp/bountywin/TEST/IN/Bounty_02695b.zip");
	$zip->extractTo("/srv/ftp/bountywin/TEST/IN/TEMPDATA");
	$zip->close();

Actual result:
--------------
Warning: ZipArchive::extractTo() [function.ZipArchive-extractTo]: Invalid or unitialized Zip object in /srv/www/vhosts/bountywebtest/test/test.php on line 12

Warning: ZipArchive::close() [function.ZipArchive-close]: Invalid or unitialized Zip object in /srv/www/vhosts/bountywebtest/test/test.php on line 13

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-24 12:12 UTC] pajoye@php.net
Please provide a link to the non working zip data.
 [2007-10-24 13:51 UTC] alan at dunns dot co dot uk
You can get a file example at ftp server 195.8.188.187 in folder php_bug.

Username: general
password: boUnt6FoTo
 [2007-10-24 13:52 UTC] alan at dunns dot co dot uk
please remove connection data after download
 [2007-10-24 14:04 UTC] pajoye@php.net
These credentials do not work. Please mail me a working user/password (pierre dot php at gmail dot com)
 [2007-11-01 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-12-02 17:00 UTC] pajoye@php.net
I finally got the time to sit down and try this bug. I sadly can't reproduce it.

Can you try it again using php 5.2.5?

Please use the following code and paste the result here:

$zip = new ZipArchive;
$r = $zip->open("/srv/ftp/bountywin/TEST/IN/Bounty_02695b.zip");
var_dump($r);

$r = $zip->extractTo("/srv/ftp/bountywin/TEST/IN/TEMPDATA");
var_dump($r);

$r = $zip->close();
var_dump($r);
 [2007-12-03 14:21 UTC] alan at dunns dot co dot uk
i have run the revised code, here is the result

int(11)
Warning: ZipArchive::extractTo() [function.ZipArchive-extractTo]: Invalid or unitialized Zip object in /srv/www/vhosts/bountywebtest/test/test.php on line 14
bool(false)
Warning: ZipArchive::close() [function.ZipArchive-close]: Invalid or unitialized Zip object in /srv/www/vhosts/bountywebtest/test/test.php on line 17
bool(false)

We are very pressured, so it may take a while to install an upgrade to php5.2.5. We are running 5.1.6.
 [2007-12-03 14:26 UTC] pajoye@php.net
The first return value "int(11)" means that the open methods did not find the file or can't open it. Be sure it is in your path. Alternatively you can try using an absolute path.

To test with 5.2.5, you can simply install it locally on your windows and run your script using the command line.

Feel free to come back or ask if you still experience problem to open this archive.
 [2007-12-03 14:54 UTC] alan at dunns dot co dot uk
I re-ran after verifying the file name and path:

int(5)
Warning: ZipArchive::extractTo() [function.ZipArchive-extractTo]: Invalid or unitialized Zip object in /srv/www/vhosts/bountywebtest/test/test.php on line 14
bool(false)
Warning: ZipArchive::close() [function.ZipArchive-close]: Invalid or unitialized Zip object in /srv/www/vhosts/bountywebtest/test/test.php on line 17
bool(false)
 [2007-12-03 15:31 UTC] pajoye@php.net
There is an error while reading.

It is hard to say why, but that's the reason why you get the warnings. The archive was not opened correctly.

Please try using the command line, it will make your tests easier. Maybe it is a permission problem or something else.

I tried this archive locally and it works perfectly. At the very least, I can try to debug on your host directly if you provide me a remote access (don't post it here but per email :).
 [2007-12-11 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 25 06:01:24 2020 UTC