ID: 32306 Updated by: [EMAIL PROTECTED] Reported By: jmcgutana at alliedbank dot com dot ph -Status: Open +Status: Bogus Bug Type: Zlib 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. No bug then. Previous Comments: ------------------------------------------------------------------------ [2005-03-15 08:42:29] jmcgutana at alliedbank dot com dot ph I edited php.ini file to contain the ff. line: memory_limit = 30M ; Maximum amount of memory a script may consume and it worked now. THANKS! ------------------------------------------------------------------------ [2005-03-15 06:04:44] [EMAIL PROTECTED] And if you increase the memory_limit in your php.ini file? ------------------------------------------------------------------------ [2005-03-15 05:29:44] jmcgutana at alliedbank dot com dot ph Description: ------------ I tried using the ZipFile class I found somewhere else to compress files and produce a zip file. But when my input file is larger than 6 megabytes in size, I don't get a zip/compressed file. I debugged the ZipFile class and found out that gzcompress() function doesn't work with a large file e.g. 6 MB file. So, in order to compress my 6 MB file and produce a zip file, I just used the ff. line of code: system("zip $zipfile_name $file_name > /dev/null", $return_val); Reproduce code: --------------- #!/usr/bin/php #phptest.php <?php $file = "ATD335R1.208"; #some file here $fp = fopen($file, "r"); if($fp) { $data = fread($fp, filesize($file)); fclose($fp); } $unc_len = strlen($data); $crc = crc32($data); $zdata = gzcompress($data); #HERE'S WHERE AN ERROR OCCURS print "GZCOMPRESS DONE..".strlen($zdata); ?> Expected result: ---------------- "GZCOMPRESS DONE.." Actual result: -------------- PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6945661 bytes) in /var/www/html/phptest.php on line 17 Content-type: text/html X-Powered-By: PHP/4.3.8 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32306&edit=1