php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29794 Doesn't execute fast enough
Submitted: 2004-08-22 22:00 UTC Modified: 2004-08-23 18:40 UTC
From: amailer at gmail dot com Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 5.0.1 OS: Windows
Private report: No CVE-ID: None
 [2004-08-22 22:00 UTC] amailer at gmail dot com
Description:
------------
Windows XP Pro [ test server ]
Apache 2
PHP 5 - FastCGI

Hello,
I am creating a script that will, take the given folder path and ZIP it. It will also zip all it's subfolders and files.

I have got the script to create the subfolders correctly-- but when I try to add the files, it takes for ever and just dies (execution time error)
Fatal error: Maximum execution time of 30 seconds exceeded in www/test/dir/explorer.php on line 34

Now, i tried changing the ini settings of the max execution time to ini_set("max_execution_time", 1000);
1000 seconds, yet that doens't work.

The script works only with folders that have a small amount of files and provided that the file sizes are small also.

If i run this script to zip a folder with many files (20+) and some 1 mb or more, the script make php use up to 98 CPU usage and yet not work, the script then dies after some time leaving me with that error.

Shouldn't this be a bit more quicker in zipping files? I mean, it uses so much of the CPU usage it lags my test server so much  (even with manually zipping it's 10x faster then that)

Hope you guys can help,
Thank you

Reproduce code:
---------------
For the source code please visit:
http://amailer.sourceforge.net/explorer.phps

I cannot provide a link to view the script in action because it lags up the server too much, sorry.

Expected result:
----------------
I want it to zip a folder with all it's subfolders and files, and save it.

Actual result:
--------------
Fatal error: Maximum execution time of 1000 seconds exceeded in C:\Program Files\Apache Group\Apache2\htdocs\termix\SUBDOMAIN\gfx-pro\Explorer\explorer.php on line 88

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-22 22:04 UTC] amailer at gmail dot com
no comment (spelling mistake)
 [2004-08-23 18:40 UTC] iliaa@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. 

Thank you for your interest in PHP.

The simple answer is that you probably have a lot of files 
and the process of generating a zip file is rather slow. 
So, PHP terminates when the execution limit is reached. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC