473,508 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

status note for scripts that run a long time

Hi,
I got some script, that depending on the parameters it gets can take
20min or so to finish execution. When running the script for these
20min one sees nothing but a white page, which is somewhat bad, as the
user think's something is wrong. So I wonder if there's a way to tell
the user, that the script is still running and he's got to wait.

Any suggestions?
Thanks a lot in advance.
Lars
Jul 17 '05 #1
8 2708
*** lars knut wrote/escribió (25 Mar 2004 02:17:35 -0800):
So I wonder if there's a way to tell the user, that the script is still
running and he's got to wait.


In this situation, I normally use "echo"'s:

echo "Processing row #" . $row_nr;

Or maybe

if($row_nr % 100 == 0){
echo "Processing row #" . $row_nr;
}

--
--
-- Álvaro G. Vicario - Burgos, Spain --
Jul 17 '05 #2
Alvaro G Vicario wrote:
*** lars knut wrote/escribió (25 Mar 2004 02:17:35 -0800):
So I wonder if there's a way to tell the user, that the script is still
running and he's got to wait.

In this situation, I normally use "echo"'s:

echo "Processing row #" . $row_nr;


I've tried that but Apache caches the php output and it all appears
together at the end. Is there any way to force buffering off?
Jul 17 '05 #3
Kevin Thorpe wrote:
Alvaro G Vicario wrote:
*** lars knut wrote/escribió (25 Mar 2004 02:17:35 -0800):
So I wonder if there's a way to tell the user, that the script is still
running and he's got to wait.


In this situation, I normally use "echo"'s:

echo "Processing row #" . $row_nr;

I've tried that but Apache caches the php output and it all appears
together at the end. Is there any way to force buffering off?


Well, apache is doing some caching, but PHP too. To send the output
buffer of PHP, use *flush*. I'm using this in some of my scripts to send
to the browser the output produced by shell scripts while they are
running and it works fine.

--
Guillaume Brocker
Jul 17 '05 #4
Hi,
I tried the flush() version. However it's not quite what I want. I
thought there would be a way which would allow me to show the user
that he's got to wait by means of a text like "Please wait..." and
when showing the results get rid of that text.
When I use flush instead, some part of the website already shows and
some part does not, which leads the user to assume, that there'S been
an error.

Does anybody have an idea how to handle that?

Thanks a lot
Lars
Jul 17 '05 #5
lars knut wrote:
I thought there would be a way which would allow me to show the user
that he's got to wait by means of a text like "Please wait..." and
when showing the results get rid of that text. Does anybody have an idea how to handle that?


Your clients do not mind having a browser window open for 20 minutes
with the words "Please wait ..."? !!! I would!
Anyway ...

I think JavaScript may be a way to do that

<OT trolling="I don't know JavaScript">

send a <p id="pleasewait">Please wait...</p>
flush (maybe send a few spaces to fill browser cache)
process for 20 minutes
send javascript to turn "pleasewait" paragraph invisible/hidden

</OT>

--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jul 17 '05 #6
la*******@gmx.net (lars knut) wrote in message news:<dd**************************@posting.google. com>...
Hi,
I tried the flush() version. However it's not quite what I want. I
thought there would be a way which would allow me to show the user
that he's got to wait by means of a text like "Please wait..." and
when showing the results get rid of that text.
When I use flush instead, some part of the website already shows and
some part does not, which leads the user to assume, that there'S been
an error.

Does anybody have an idea how to handle that?

This is one of the reasons that HTML sucks so bad as a user interface.
Could you do a simple front end in Flash or Java? It could be just a
little box that says "Please wait", then disappears when the PHP
script is done.
Jul 17 '05 #7
Thank you for your answer.
Your clients do not mind having a browser window open for 20 minutes
with the words "Please wait ..."? !!! I would! They don't mind, as they know that processing some hundred thousand
database entries and doing some complex calculations takes a lot of
time and usually should be done with a datawarehouse system, which
they don't want to pay for.

Anyway... <OT trolling="I don't know JavaScript">

send a <p id="pleasewait">Please wait...</p>
flush (maybe send a few spaces to fill browser cache)
process for 20 minutes
send javascript to turn "pleasewait" paragraph invisible/hidden

</OT>

Intersting idea! Do you know how I could trigger the turn invisible
part? Because I haven't. :-(

Thanks
Lars
Jul 17 '05 #8
Thanks for your answer.
This is one of the reasons that HTML sucks so bad as a user interface.
Could you do a simple front end in Flash or Java? It could be just a
little box that says "Please wait", then disappears when the PHP
script is done.


Do you know what I could use as an event-hanlder to tell flash or
java, that it should disappear, as the php is done?

Thanks
Lars
Jul 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7066
by: Ruud de Jong | last post by:
The question I have is: how safe / future proof / portable is the use of the __subclasses__ method that exists for new-style classes? Background: I thought I had found an easy-to-understand...
13
1551
by: Thomas Reichelt | last post by:
Hello Python-Fans, A few months in the past, I learned the Python language and was very pleased of it. I have now written many scripts for myself and this opinion stayed, not to say, it became...
27
2564
by: John Roth | last post by:
PEP 263 is marked finished in the PEP index, however I haven't seen the specified Phase 2 in the list of changes for 2.4 which is when I expected it. Did phase 2 get cancelled, or is it just not...
2
4720
by: Charles Mendell | last post by:
1. When I go to http://www.w3schools.com/js/default.asp and choose: 2. JS HTML DOM and then choose: 3. the Window object and then choose: 4. Write some text in the windows status bar ( a link)...
1
1497
by: Francis | last post by:
Hi everyone, I was just wondering if anyone could help me. I am writing a small win32 app using C#/.net. When something is executed, I want to put in a counter which counts up how long the process...
42
34092
by: Greg | last post by:
Hi, I've designed a bookmark in Ajax / PHP that I will put soon on sourceforge.net. But I've got an very tricky bug. I try it on some computers with Internet Explorer/Windows, Firefox...
19
3735
by: Frances | last post by:
Firefox is not respecting window.status, examples in this pg http://www.csua.berkeley.edu/~jgwang/jsform02.htm are ignored by Firefox.. why is this.. is there a solution.. thank you.. Frances
18
4110
by: mistral | last post by:
Is there some other (more advanced) effects for status bar, other than standard Scroller Bar, TypeWriter Scroller, Flashing Bar, Decrypter, Ticker, World Clock?
6
1400
by: Armin Horner | last post by:
hi ng. I want to integrate a status on my (business) Homepage It should look like: Right now we're in the shop ... are closed. (.. we have different working hours between saison)
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.