#32274 [Opn->Bgs]: Can't create zip file

From: Date: Fri, 11 Mar 2005 09:36:31 +0000
Subject: #32274 [Opn->Bgs]: Can't create zip file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76989@lists.php.net to get a copy of this message
ID: 32274 Updated by: tony2001@php.net Reported By: jmcgutana at alliedbank dot com dot ph -Status: Open +Status: Bogus Bug Type: *Compression related Operating System: Linux Fedora Core PHP Version: 4.3.8 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2005-03-11 05:59:54] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32274&edit=1

« previous php.bugs (#76989) next »