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

Your name:

Reply:


Posted by a on 02/18/06 02:00

Hi everybody,

My config: Win XP (or 2003), Apache 2.0.54, PHP 5.1.2.

I have been trying to handle the case of a lenghty opearation on the server
while providing the user with feedback and ability to cancel, and nothing
seems to work so far.

The following code is one attempt to address this, and it is called as
result of a POST:

//*************start code***************
session_start;

// prepare exec

// flush session data
session_write_close;

// trying to display a "Please wait..." message:
header( "Location: please_wait.php" );

// long exec
exec( ... );

// finally show the result of the exec
header( "Location: exec_result.php" );
//************end code*******************

What happens is that only the last header statement has a visual effect, the
first one doesn't do anything, so the user is not presented with the "Please
wait message".

I would appreciate any ideas or code examples on this or the issue of
handling this sort of lengthy operations in general.

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

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