473,386 Members | 1,790 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,386 software developers and data experts.

Abort php script

Hi!

Iam wondering how u can abort php script execution if itsn't done efter f
ex 60 s?

--
just keep swiming
Jul 17 '05 #1
4 3055
Hi Caramba,

Check your php.ini and find this:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in
seconds
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
Speaks for itself I think.

Good luck!

Regards,
Erwin Moller
Jul 17 '05 #2
well, I know that, but I have script that some time can't execute it seft
and the page loading wount and for ever... thats why I waht to set abort
time

carramba

Erwin Moller
<si******************************************@spam yourself.com> skrev den
Tue, 04 May 2004 17:36:38 +0200:
Hi Caramba,

Check your php.ini and find this:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in
seconds
memory_limit = 8M ; Maximum amount of memory a script may consume
(8MB)
Speaks for itself I think.

Good luck!

Regards,
Erwin Moller


--
just keep swiming
Jul 17 '05 #3
carramba a écrit le 04/05/2004 :
well, I know that, but I have script that some time can't execute it seft
and the page loading wount and for ever... thats why I waht to set abort
time


Check your server instead. If it is just "from time to time" for the
same script doing the same thing (on the same amount of data) then it
is not a PHP problem...
Otherwise as introduced before use max_execution_time and ini_set()
function to change this value in a specific script.
http://www.php.net/ini_set
Jul 17 '05 #4
Jedi121 <je*********@free.fr.Removethis> wrote:
carramba a écrit le 04/05/2004 :
well, I know that, but I have script that some time can't execute it seft
and the page loading wount and for ever... thats why I waht to set abort
time


Check your server instead. If it is just "from time to time" for the
same script doing the same thing (on the same amount of data) then it
is not a PHP problem...
Otherwise as introduced before use max_execution_time and ini_set()
function to change this value in a specific script.
http://www.php.net/ini_set


If for some other reason you need to exit the php script, you can do a
timestamp in the start of the script, the do a compare where you want it
to exit. then you can for instance do like this:

$timestamp = date();

....
if( $timestamp < strtotime("-60 seconds") )
{
exit();
}
Jul 17 '05 #5

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

Similar topics

2
by: mike_j | last post by:
I'm writing a download script in php. This script sends files using echo in order to limit download speed. My script has to do something after connection abort. Everything is ok unless client...
0
by: mike_j | last post by:
I'm writing a download script in php. This script sends files using echo in order to limit download speed. My script has to do something after connection abort. Everything is ok unless client...
1
by: Muffinman | last post by:
Hi, I have this script which can run for twenty minutes to which I also have set it's time limit. However if the user want's to abort and closes the window or whatever the script keeps on...
0
by: Markus Franz | last post by:
Hallo! I use Python mostly for CGI (Apache). And now I habe a problem: How can I handle the situation if a user clicks on "abort" in the browser? It seems that a CGI-script is NOT stopped at...
3
by: Julia | last post by:
Is there some way in Javascript to abort a script...not just a function, but the entire script? Most languages I've used have something like an exit or abort function. I want to be able to alert...
13
by: Shailesh Humbad | last post by:
Here is an advanced PHP question. Can anyone think of a way to detect the number of bytes written to output when a script is aborted? I am sending a large file to the client, and I want to record...
1
by: Michael Yanowitz | last post by:
Hello: I have successfully implemented a Tkinter GUI which has this (simplified here for explanation): +-------------------------------------+ | filename: | | ...
2
by: boczek | last post by:
Hello all. I'm writing a small async webapp. in JavaScript and I'm using <script> element technique to load data. I'm usign <scriptbecause of cross domain restrictions with XmlRequest. The...
3
rsrinivasan
by: rsrinivasan | last post by:
Hi all, I am using the below html page. It displays a messagebox when the page is loaded. But the messagebox has 3 button abort,retry, ignore. But i want only abort and ignore button. what should...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.