473,408 Members | 2,477 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,408 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 2157
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: 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: 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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.