php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32274 Can't create zip file
Submitted: 2005-03-11 05:59 UTC Modified: 2005-03-11 10:36 UTC
From: jmcgutana at alliedbank dot com dot ph Assigned:
Status: Not a bug Package: *Compression related
PHP Version: 4.3.8 OS: Linux Fedora Core
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jmcgutana at alliedbank dot com dot ph
New email:
PHP Version: OS:

 

 [2005-03-11 05:59 UTC] jmcgutana at alliedbank dot com dot ph
Description:
------------
I am using the class 'zipfile' I found from Zend.com to create zip files. It works well with files smaller than 1 megabyte in size.  But when I tried to zip a file larger than 1 mb, it doesn't produce the zip file.

Reproduce code:
---------------
<?php require("ZipFile.inc.php"); #from Zend.com
                                                                                                                             $zipfile = new ZipFile();
$zipfile->add_dir("./");                                                                                                                                                                                                                                                
                                                                                                                             $file = "ATD34501-030705V.208.00"; #some file here..
$fp = fopen($file, "r");
$filedata = "";
if($fp) {
        $filedata = fread($fp, filesize($file));
        fclose($fp);
}
                                                                                                                             print "\nfile opened..\n";
                                                                                                                             $zipfile->add_file($filedata, basename($file));
                                                                                                                             print "\nfile added in zip..\n";
                                                                                                                             $ftpdir = "/var/ftp/pub/031105"; #ftp directory
$fname = "test.zip"; #zipfile name
                                                                                                                             $fp = fopen("$ftpdir/$fname", "w+");
if($fp) {
        fwrite($fp, $zipfile->file());
        fclose($fp);
}                                                                                                                              ?>

Expected result:
----------------
test.zip file

Actual result:
--------------
no file created

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-11 10:36 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Even if you think it is not a bug, we often know better than you,
please consult the support channels first before even considering
to reopen this report.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Feb 23 22:01:26 2019 UTC