|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-11 05:14 UTC] pierre dot php at gmail dot com
[2006-07-11 07:24 UTC] durmont at yahoo dot fr
[2006-07-11 07:26 UTC] pierre dot php at gmail dot com
[2006-07-12 05:17 UTC] durmont at yahoo dot fr
[2006-07-12 05:26 UTC] pierre dot php at gmail dot com
[2006-07-12 12:00 UTC] durmont at yahoo dot fr
[2006-07-12 12:10 UTC] pierre dot php at gmail dot com
[2006-07-12 12:11 UTC] pierre dot php at gmail dot com
[2006-07-12 13:16 UTC] durmont at yahoo dot fr
[2006-07-12 13:20 UTC] pierre dot php at gmail dot com
[2006-07-13 05:09 UTC] durmont at yahoo dot fr
[2006-07-13 05:27 UTC] pierre dot php at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 09:00:01 2025 UTC |
Description: ------------ actually it's with PHP 5.1.4 but it's not in the list... I use php_zip.dll from pecl 5.1.4 found on php.net download page. The simple codes(1) and (2) below are used to open somewhat large archives (about 60 Mb each, containing about 300 jpg photos) These scripts are the only ones to be called on that server at the moment. After an hour and 200 users accessing the page, my apache threads are eating up 1Gb of ram, and this number never decreases. I've added a cache system to my script so I don't extract the images from the zip at every call. It flattens the memory curve, but it's still increasing. Reproduce code: --------------- ==== code 1 ==== $zip=zip_open($absolute_path); while ($zip_entry=zip_read($zip)) { $this->nbImg++; zip_entry_close($zip_entry); } zip_close($zip); ==== code 2 ==== $zip=zip_open($absolute_path); $zip_entry=zip_read($zip); for ($i=0;$i<$img;$i++) { zip_entry_close($zip_entry); $zip_entry=zip_read($zip); } $fic=zip_entry_read($zip_entry,zip_entry_filesize($zip_entry)); /* here I return $fic to the browser as an image file*/ zip_entry_close($zip_entry); Expected result: ---------------- everything runs fine, exepted the memory usage going wild !