Reply to Re: Start another process?

Your name:

Reply:


Posted by Erwin Moller on 09/06/07 14:44

Tedois wrote:
> Hey guys,
>
> I'm having trouble generating a report in fpdf. It's huge and taking a
> *lot* of time, causing timeouts. I've tried everything in fpdf without
> much success. I can't break the report into smaller pieces nor change
> it.
>
> What I want to do now is create another process that generates the
> report, and the php app to keep "asking" if the report is ready and
> when it is, just show it.
>
> Now, how am I supposed to do that? Is it possible to be done? SOAP?
> XML-RPC? Any ideas?
>
>
> Thanks in advance,
> Thiago
>

Hi,

Difficult. This involves polling from the client, starting a fresh
process that may run for ages, and making sure the polling clients gets
the info that the report is ready.
Can be done, but I would prefer to take another (less errorprone) route.

I think I would chicken out as follows (just an idea):
1) tell the visitor to give an emailaddress. (where the report must go)
2) Store in your database the details you need to generate the report,
along with the emailaddress.
3) Make a cronjob that runs every 5 minutes and calls some php-file that
checks if a new pdf-generating job is stored in the db.
4) If so, run the pdf-job, email the result, and flag the job as done.

That way you only use 'standard' buildingblocks and do not have to start
new processes. (At least what I consider 'standard buildingblocks').

just my 2 cent.

Regards,
Erwin Moller

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация