472,784 Members | 1,289 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how can I offload code processing to the server like a "stored procedures "

I have a script that loops through email addresses takes long enough to time
out the web page.

Any ideas how to offload that process or avoid the timeout? Thanks.
Jul 17 '05 #1
5 2140
To stop PHP from timing out, call set_time_limit(0). To keep the browser
from timing out, you need to send something to it every now and then.

At the end of the loop, do something like echo "<!-- NO TIMEOUT -->\n"; Or
if you wish to be more user-friendly--echo "<script>
ShowProgress($processed, $total); </script>\n"; where ShowProgress is a
Javascript function that update something (like a progress bar) on the page.

Uzytkownik "NotGiven" <no****@nonegiven.net> napisal w wiadomosci
news:9z*****************@bignews6.bellsouth.net...
I have a script that loops through email addresses takes long enough to time out the web page.

Any ideas how to offload that process or avoid the timeout? Thanks.

Jul 17 '05 #2
calling set_time_limit(0) is a nice, however it won't override the
maximum execution time stipulated in php.ini. You may wanna have your
script executed from shell with the right parameters(consult the
manual concerning the command line parameters) and redirect the output
to /dev/null or some other place (it depends whether you need the
output or not).

Best Regards,

Lucas
"Chung Leong" <ch***********@hotmail.com> wrote in message news:<pK********************@comcast.com>...
To stop PHP from timing out, call set_time_limit(0). To keep the browser
from timing out, you need to send something to it every now and then.

At the end of the loop, do something like echo "<!-- NO TIMEOUT -->\n"; Or
if you wish to be more user-friendly--echo "<script>
ShowProgress($processed, $total); </script>\n"; where ShowProgress is a
Javascript function that update something (like a progress bar) on the page.

Uzytkownik "NotGiven" <no****@nonegiven.net> napisal w wiadomosci
news:9z*****************@bignews6.bellsouth.net...
I have a script that loops through email addresses takes long enough to

time
out the web page.

Any ideas how to offload that process or avoid the timeout? Thanks.

Jul 17 '05 #3
alternatively, you may fork off the daemon process with a signal
handler making it "independent" of any events on the client side. See
some tutorials on process control functions for further details on
this matter.
Best Regards,

Lucas
"Chung Leong" <ch***********@hotmail.com> wrote in message news:<pK********************@comcast.com>...
To stop PHP from timing out, call set_time_limit(0). To keep the browser
from timing out, you need to send something to it every now and then.

At the end of the loop, do something like echo "<!-- NO TIMEOUT -->\n"; Or
if you wish to be more user-friendly--echo "<script>
ShowProgress($processed, $total); </script>\n"; where ShowProgress is a
Javascript function that update something (like a progress bar) on the page.

Uzytkownik "NotGiven" <no****@nonegiven.net> napisal w wiadomosci
news:9z*****************@bignews6.bellsouth.net...
I have a script that loops through email addresses takes long enough to

time
out the web page.

Any ideas how to offload that process or avoid the timeout? Thanks.

Jul 17 '05 #4
thanks
"NotGiven" <no****@nonegiven.net> wrote in message
news:9z*****************@bignews6.bellsouth.net...
I have a script that loops through email addresses takes long enough to time out the web page.

Any ideas how to offload that process or avoid the timeout? Thanks.

Jul 17 '05 #5
According to Lucas <th******@directbox.com>:
calling set_time_limit(0) is a nice, however it won't override the
maximum execution time stipulated in php.ini.


Actually, this is only the case if PHP is in safe mode. If not in safe mode,
the script is allowed to set the maximum execution time to whatever it wants.

--
eth'nT
http://www.hydrous.net
to email: remove all capital letters from given address
Jul 17 '05 #6

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

Similar topics

5
by: Steve Holden | last post by:
Has anyone, with any driver whatsoever, managed to retrieve output parameters from a SQL Server stored procedure? I've just been rather embarrassed to find out it's not as easy as it might seem,...
2
by: valexena | last post by:
My attempt to read the view creation code stored in the Oracle data dictionary has encountered a problem. The view code appears to be getting cut off at the end. What have I to do resolve this...
1
by: T.S.Negi | last post by:
Dear All, Please suggest some of the best practices for writing SQL server stored procedures? I'm writing a business function (stored procedure), which calls many-stored procedure one after...
11
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
1
by: sollento | last post by:
Hi, How can I export SQL Server Stored Procedures to MS-Access? Cheers H
6
by: fumanchu | last post by:
I've got to let end users (really just one person) load billing batch files into a third party app table. They need to specify the billing cycle name, the batch name, and the input file name and...
2
by: honcho | last post by:
Hello, Does anyone have an example of an SQL Server stored procedure that updates a record, where one of its field is of type "text"? My procedure is /* ** Update the client note and...
4
by: Bharani Dharan | last post by:
hi all how do I get the compiled value of the code stored in a string? For instance:- dim strVal as String = "Response.write(1)" I want the code stored in the string to be executed and when...
1
by: seyyadri | last post by:
Hi, I want the data in excel, pulled from SQL server stored procedure. The SQL SP has the parameters. when we open/refresh the excel it should prompt the user to enter the parameters (dynamically),...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.