473,466 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

long process and timeout

Some of my code has a long process, and my ISP limits the scripts to 30
seconds.

Now, I must absolutely create a file with some string (simply a number and
an email), then process any line with some long operations.
If the script timeouts, then calling the script again should start when it
finished.

How to achieve that ?

I tough about deleting the last line every time it's processed and then the
process is done when the file is empty.
There is also the possibility to create a tracker file where I save the last
processed number, but it's longer to do.

Any tip ?
Jul 17 '05 #1
3 2709
Bob Bedford wrote:
Some of my code has a long process, and my ISP limits the scripts to 30
seconds.

Now, I must absolutely create a file with some string (simply a number and
an email), then process any line with some long operations.
If the script timeouts, then calling the script again should start when it
finished.


<snip>

Did you try to overrule that setting with ini_set?
You can use it at the start of your script and set another value for the
script timeout.

(read here)
http://nl2.php.net/manual/en/function.ini-set.php

Try that first, if just might work.

Regards,
Erwin Moller
Jul 17 '05 #2


Bob Bedford wrote:
Some of my code has a long process, and my ISP limits the scripts to 30
seconds.

Now, I must absolutely create a file with some string (simply a number and
an email), then process any line with some long operations.
If the script timeouts, then calling the script again should start when it
finished.

How to achieve that ?

I tough about deleting the last line every time it's processed and then the
process is done when the file is empty.
There is also the possibility to create a tracker file where I save the last
processed number, but it's longer to do.

Any tip ?


Jul 17 '05 #3


Erwin Moller wrote:
Bob Bedford wrote:
Some of my code has a long process, and my ISP limits the scripts to 30
seconds.

Now, I must absolutely create a file with some string (simply a number and
an email), then process any line with some long operations.
If the script timeouts, then calling the script again should start when it
finished.


<snip>

Did you try to overrule that setting with ini_set?
You can use it at the start of your script and set another value for the
script timeout.

(read here)
http://nl2.php.net/manual/en/function.ini-set.php


or, if you are allowed to use .htaccess files, put one in the folder
that your long running script is in. Try this, it works great for me:

# php_value name value
php_value post_max_size 666M
php_value upload_max_filesize 10M
php_value max_execution_time 16666

Jul 17 '05 #4

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

Similar topics

10
by: Doug | last post by:
I have a script that does a huge database update, which takes a long time. However, the host I am running on (and I suspect most hosts) are running in "safe mode." This means I cannot change the...
5
by: Rajani | last post by:
Hello, First of all sorry for the long code. But i want to explain clearly what i am doing. For i = 0 To UBound(arrResSizes) - 1 For j = 0 To UBound(arrqty) - 1 For k = 1 To totopr Step 8...
4
by: Siang Hwee | last post by:
Hi. I am facing some problem in Asp.net. I am developing a payroll application currently. This is a web-based application. User need to click on "Process" button in order to process the payroll...
9
by: rsine | last post by:
I have developed a program that sends a command through the serial port to our business system and then reads from the buffer looking for a number. Everything worked great on my WinXP system, but...
2
by: Alexander van Doormalen | last post by:
I am trying to run an external process (command tool) within a Windows Service with the specified account. When the application launches I get a error dialog with the following message: ...
3
by: lai_waiman | last post by:
Dear All, I have problems on doing some long lasting job in a web services. Let me first provide some background information first. I have a ASP.NET web page, which will call another Web...
1
by: Ralph | last post by:
Okay I have a website where the user is going to hit a button to kick off a process that is going to take a long amount of time. Is there anyway without using AJAX, or possibly a windows control on...
1
by: Terry Olsen | last post by:
I have a web app that gathers live data from network pc's and then displays it to the client. It worked fine until I was asked to allow the user to select multiple pc's for display. Now, depending...
8
by: jr | last post by:
I have an application the makes a call to a webservice to retrieve some additional info for my app. The information I get back is non-essential, so I do NOT want my entire app hanging to wait for...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
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,...
0
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
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...

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.