NYCPHP Meetup

NYPHP.org

[nycphp-talk] Script terminates after certain amount of time period

Carlos A Hoyos cahoyos at us.ibm.com
Fri Sep 12 05:54:01 EDT 2003







Start by modify your program to run from the command line (take the
arguments via argv, and write the output to disk). This will allow you to
do some profiling and find out what execution time and resources usage are.

If you can't optimize it, you will have to fork it: When the user calls
your script, you execute your pdf-generator program in the background via
"exec" and just echo a message that the "pdf is being generated" and some
javascript that after some few seconds will change the location to a second
php page.
This second page will check if the pdf generator has already created the
file, and if it has it will serve it, otherwise it will wait for another 10
seconds before reloading.

The whole thing is not hard to implement, but be careful about the little
details and security validation in each of the steps.


Carlos


                                                                                                                                     
                      "Anirudh Zala"                                                                                                 
                      <xml at aumcomputers        To:       "NYPHP Talk" <talk at lists.nyphp.org>                                         
                      .com>                    cc:                                                                                   
                      Sent by:                 Subject:  Re: [nycphp-talk] Script terminates after certain amount of time period      
                      talk-bounces at list                                                                                              
                      s.nyphp.org                                                                                                    
                                                                                                                                     
                                                                                                                                     
                      09/12/2003 10:07                                                                                               
                      AM                                                                                                             
                      Please respond to                                                                                              
                      NYPHP Talk                                                                                                     
                                                                                                                                     



Thanks all,

BUT nothing is working. I have also increased memory limit upto 20MB, and
tried all of your's suggestions, but still result is 0. While testing this
script on Netscape and other browser same error occures except message is
different that "Document contains no data".

Looks like it needs huge amount of memory resources as finally over 15 MB
PDF document is to be created by that script. Perhaps Apache or Php is not
able to handle this much amount of data in memory. Any other suggestions
will be welcomed.

Thanks

Anirudh Zala






More information about the talk mailing list