Question

I am writing a process that I can't post all of the code for but I will start to outline it and preface it by saying when it is editing and zipping say 10 - 20 documents its fine

so what happens: (most of the time) A user clicks a link, Jquery submits an ajax request to a php file

The php file takes an array of filenames goes to the sql table, and gets the files location on disk.

it opens the file and overlays some text with zend pdf package

then adds the file to a zip folder I open, it repeats this process until all the files are zipped and then returns a string to the browser with the url for the file and it tells the browser to download it and the user saves or opens the zip file.

Like I said a zip file with less than 22 or so files seems to be fine.

Beyond that the code doesn't seem to finish, I go to find where the ajax/php code makes the zip and the zip file is there but it has stopped at some point. (and the point/file doesn't seem to be the same every time) Sometimes there are 19 files, sometimes 21, or 22 files in the zip folder when there should be 35 files.

I can paste some of the code to like pastebin or something if its needed.

this hasn't happened during our testing as the majority of the time there are 1, 2 or 3 files in the zip folder

Was it helpful?

Solution

Changing the max_execution_time in php.ini resolved the issue the PHP script was running for 45 seconds and max_execution_time was set to 30 seconds

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top