Re: [PHP]Zip and text files generated are corrupted

2010-03-30 Thread Bastien Helders
I've come to realize something, but I'm not sure if I could be right: Maybe the instructions are interrupted because there is a lack of virtual memory. I mean is there not a limit to the memory the script can use? It would explain why the script goes on, as when the instruction is interrupted,

Re: [PHP]Zip and text files generated are corrupted

2010-03-29 Thread Bastien Helders
I'm not sure. What is the exact command you are using? I'll show the code for the two scenario, maybe it'll help. I've edited out the sensitive information though, but I kept the essence of how it works. 1) Copy the previous file and make modification on it ?php //This is this command that got

Re: [PHP]Zip and text files generated are corrupted

2010-03-27 Thread Kim Madsen
Mike Roberts wrote on 25/03/2010 14:56: remove No :-) Use the proper unsubscribe method rather than spamming the list. -- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP]Zip and text files generated are corrupted

2010-03-26 Thread Bastien Helders
I've already specified the outputs, and it doesn't change if I put it in a file. 1)In the first scenario, where all the data are compressed together, the only call of exec('zip') give this output: OUTPUT adding: bin/ (stored 0%) adding: bin/startHotFixInstaller.bat (deflated 41%) adding:

Re: [PHP]Zip and text files generated are corrupted

2010-03-26 Thread Richard Quadling
On 26 March 2010 08:51, Bastien Helders eldroskan...@gmail.com wrote: I've already specified the outputs, and it doesn't change if I put it in a file. 1)In the first scenario, where all the data are compressed together, the only call of exec('zip') give this output: OUTPUT adding: bin/

Re: [PHP]Zip and text files generated are corrupted

2010-03-26 Thread Bastien Helders
I already used error_reporting and set_time_limit and the use of ini_set('display_errors', 1); didn't display more exceptions. However the modification in the exec helped display STDERR I think. 1) In the first scenario we have the following: STDERR zip warning:

Re: [PHP]Zip and text files generated are corrupted

2010-03-26 Thread Richard Quadling
On 26 March 2010 12:21, Bastien Helders eldroskan...@gmail.com wrote: I already used error_reporting and set_time_limit and the use of ini_set('display_errors', 1); didn't display more exceptions. However the modification in the exec helped display STDERR I think. 1) In the first scenario we

Re: [PHP]Zip and text files generated are corrupted

2010-03-26 Thread Bastien Helders
I have checked the rights on the file for the first scenario and no user as locked it, I can see it, read it and write into it. I could even delete it if I wanted. For the second scenario, it doesn't even apply, as the exec('zip') that timeout try to create a new file (naturally in a folder

Re: [PHP]Zip and text files generated are corrupted

2010-03-26 Thread Richard Quadling
On 26 March 2010 15:20, Bastien Helders eldroskan...@gmail.com wrote:  I have checked the rights on the file for the first scenario and no user as locked it, I can see it, read it and write into it. I could even delete it if I wanted. For the second scenario, it doesn't even apply, as the

Re: [PHP]Zip and text files generated are corrupted

2010-03-25 Thread Bastien Helders
So I tested two scenario: - First, I gather all the files selected for the patch and then compress them together and here is what is displayed: [Begin display] The command zip -gr ../../build/Patch-6-3-2_Q3P15.zip * returned a status of 14 and the following output: adding: bin/ (stored 0%)

Re: [PHP]Zip and text files generated are corrupted

2010-03-25 Thread Bastien Helders
Forgot to say, it is the second scenario that generate corrupted zip and text files with unexpected end of files. 2010/3/25 Bastien Helders eldroskan...@gmail.com So I tested two scenario: - First, I gather all the files selected for the patch and then compress them together and here is what

Re: [PHP]Zip and text files generated are corrupted

2010-03-25 Thread Bastien Helders
I'm really stumped, it seems that although the script is running under the time limit, if a single instruction such as exec(zip) in the first case, or copy() in the second case are timing out, because it takes too much time processing the big file. Is there any configuration in php.ini (or

RE: [PHP]Zip and text files generated are corrupted

2010-03-25 Thread Mike Roberts
://www.profsurv.com/magazine/article.aspx?i=70379 -Original Message- From: Bastien Helders [mailto:eldroskan...@gmail.com] Sent: Thursday, March 25, 2010 9:32 AM To: rquadl...@googlemail.com Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net Subject: Re: [PHP]Zip and text files generated

Re: [PHP]Zip and text files generated are corrupted

2010-03-25 Thread Richard Quadling
On 25 March 2010 13:31, Bastien Helders eldroskan...@gmail.com wrote: I'm really stumped, it seems that although the script is running under the time limit, if a single instruction such as exec(zip) in the first case, or copy() in the second case are timing out, because it takes too much time

Re: [PHP]Zip and text files generated are corrupted

2010-03-24 Thread Ashley Sheridan
On Wed, 2010-03-24 at 15:34 +0100, Bastien Helders wrote: Hi list, I've got this web app, which from a list of selected folders (with content) want to create a zip containing them as well as creating a text file with information about the chosen folders and how to use them. To create the

Re: [PHP]Zip and text files generated are corrupted

2010-03-24 Thread Bastien Helders
Hi Ashley, No, I set the time limit high enough (set_time_limit(2*HOUR+8*MINUTE);), and the execution stops a long time before the time limit is reached. It might be relevent that the web application is hosted on a Windows Machine. I asked myself, would setting the parameter memory_limit of the

Re: [PHP]Zip and text files generated are corrupted

2010-03-24 Thread Richard Quadling
On 24 March 2010 15:19, Bastien Helders eldroskan...@gmail.com wrote: Hi Ashley, No, I set the time limit high enough (set_time_limit(2*HOUR+8*MINUTE);), and the execution stops a long time before the time limit is reached. It might be relevent that the web application is hosted on a Windows

RE: [PHP]Zip and text files generated are corrupted

2010-03-24 Thread Mike Roberts
://www.profsurv.com/magazine/article.aspx?i=70379 -Original Message- From: Bastien Helders [mailto:eldroskan...@gmail.com] Sent: Wednesday, March 24, 2010 11:19 AM To: a...@ashleysheridan.co.uk Cc: php-general@lists.php.net Subject: Re: [PHP]Zip and text files generated are corrupted Hi Ashley

RE: [PHP]Zip and text files generated are corrupted

2010-03-24 Thread Mike Roberts
://www.profsurv.com/magazine/article.aspx?i=70379 -Original Message- From: Richard Quadling [mailto:rquadl...@googlemail.com] Sent: Wednesday, March 24, 2010 11:25 AM To: Bastien Helders Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net Subject: Re: [PHP]Zip and text files generated