|  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.
Block user comment
Status: Assign to:
Bug Type:
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
I am using the class 'zipfile' I found from 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(""); #from
                                                                                                                             $zipfile = new ZipFile();
                                                                                                                             $file = "ATD34501-030705V.208.00"; #some file here..
$fp = fopen($file, "r");
$filedata = "";
if($fp) {
        $filedata = fread($fp, filesize($file));
                                                                                                                             print "\nfile opened..\n";
                                                                                                                             $zipfile->add_file($filedata, basename($file));
                                                                                                                             print "\nfile added in zip..\n";
                                                                                                                             $ftpdir = "/var/ftp/pub/031105"; #ftp directory
$fname = ""; #zipfile name
                                                                                                                             $fp = fopen("$ftpdir/$fname", "w+");
if($fp) {
        fwrite($fp, $zipfile->file());
}                                                                                                                              ?>

Expected result:
---------------- file

Actual result:
no file created


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-11 10:36 UTC]
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 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: Mon Aug 26 09:01:26 2019 UTC