473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Let script finish even users close their browser

Hello All,

I am using Linux, php and mysql.

When I run my script, it will take a very long time. So when users
close their browsers, my scripts stop either. What I want to do is let
the script continue running and send an email at the end.

How can I successfully do that?

Thanks.

Z. D.

Sep 28 '06 #1
3 2039
du*******@gmail.com wrote:
Hello All,

I am using Linux, php and mysql.

When I run my script, it will take a very long time. So when users
close their browsers, my scripts stop either. What I want to do is let
the script continue running and send an email at the end.

How can I successfully do that?

Thanks.

Z. D.
Hi,

Are you sure your script stops running when the client closes the browser?
That surprises me, because AFAIK the server is working on a request and has
no open line to the state of the visitors browser.

I expect that your script finishes just fine, both when the browser windows
is closed or leaved open.

So, are you sure this is happening?

Regards,
Erwin Moller
Sep 29 '06 #2
Erwin Moller said the following on 29/09/2006 10:55:
du*******@gmail.com wrote:
>I am using Linux, php and mysql.

When I run my script, it will take a very long time. So when users
close their browsers, my scripts stop either. What I want to do is let
the script continue running and send an email at the end.

How can I successfully do that?

Are you sure your script stops running when the client closes the browser?
That surprises me, because AFAIK the server is working on a request and has
no open line to the state of the visitors browser.

I expect that your script finishes just fine, both when the browser windows
is closed or leaved open.

So, are you sure this is happening?
If the browser is closed whilst the script is still processing, then the
server *will* know about this, because the TCP connection will be
terminated.

See http://php.net/manual/features.connection-handling.php.
--
Oli
Sep 29 '06 #3
Oli Filth wrote:
Erwin Moller said the following on 29/09/2006 10:55:
>du*******@gmail.com wrote:
>>I am using Linux, php and mysql.

When I run my script, it will take a very long time. So when users
close their browsers, my scripts stop either. What I want to do is let
the script continue running and send an email at the end.

How can I successfully do that?

Are you sure your script stops running when the client closes the
browser? That surprises me, because AFAIK the server is working on a
request and has no open line to the state of the visitors browser.

I expect that your script finishes just fine, both when the browser
windows is closed or leaved open.

So, are you sure this is happening?

If the browser is closed whilst the script is still processing, then the
server *will* know about this, because the TCP connection will be
terminated.

See http://php.net/manual/features.connection-handling.php.
Oki, That's clear.
Your link also contains the answer the OP was looking for. :-)
ignore_user_abort()
Thanks Oli.

Regards,
Erwin

Sep 29 '06 #4

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

Similar topics

5
by: Boris Nikolaevich | last post by:
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution. ...
11
by: Wentink | last post by:
Does anybody have a simple script that let's me popup a picture from a thumbnail? The ones i found are all very very complicated and messy in the source... Thanks, Tintin
8
by: Johnny Knoxville | last post by:
I've added a favicon to my site (http://lazyape.filetap.com/) which works fine if you add the site to favourites the normal way, but I have some JavaScript code on a couple of pages with a link,...
2
by: duzhidian | last post by:
Hello All, I am using Linux, php and mysql. When I run my script, it will take a very long time. I find when users close their browsers, my script stops either. What I want to do is let the...
5
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On...
2
by: Nosferatum | last post by:
This script is meant to limit access by sessions, using username and password from mysql db and redirect users after login according to a given value belonging to each user in the db (10,20,30,40)....
3
by: steven.rojas | last post by:
I have a chat application based on PHP and Flash, I know that is necessary execute the socket server script from the console (#!/usr/ local/bin/php -q), but my problem is that I don't have SSH...
5
by: Guillermo Antonio Amaral Bastidas | last post by:
Hi everybody, I have a quick and probably dumb question, keep in mind I just dumped my old love FastCGI + Perl for it's younger hotter friend PHP5. If the user calls a time consuming script...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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
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...
0
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...

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.