Reply to Re: "header" call doesn't work before lenghty operation

Your name:

Reply:


Posted by a on 02/19/06 02:46

Thanks for your reply.

> you have to do something like this:
> (is an example to form procesing)
>
> ----form.php------
> start sessions
> show form
> form action=pleasewait.php
>
> ---pleasewait.php---
> start sessions
> do exec.
> show "please wait" page but insert a meta-refresh tag like this:
> <meta http-equiv="refresh" content="3;url=./result.php" />
> in the header.
> It will redirect automatically to the next script
>
> ---result.php-----
> show results page.
>

I'm still not sure this is going to work, because after exec which returns
immediately, I still have to check that the long operation has finished and
then show the result, and that can take any amount of time.

The process that is exec'ed signals the end of the processing by creating a
file, and in my script I something like this:

while( !file_exists( $signal_end_file ) )
sleep( 1 );

While this loop is going on, I can't do anything else in the scripts
associated with this session.

Is there any other way to check for the end of the operation on the server,
that would not block, for example event based etc.

Thanks,

A

[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

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