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

Script stops running during while()

I have a php script which simply stops midway through a while loop
that processes records returned by a MySQL query. The HTML page
continues trying to load the page but the php has stopped running and
eventually I get a timeout. The script is running in my development
environment which consists of php 4.3.4, Apache 1.3.28 and MySQL
4.0.17, installed on Windows XP with Service Pack 2.

I suspect that there may be a problem with my installation
configuration for a number of reasons:
- I have a new PC and had to re-install php, Apache and MySQL
- The script executed perfectly on my old PC (which I no longer have)
using the same versions of php etc.
- The script executes perfectly in my production environment (which is
running on a Linux server using Apache and MySQL)
- The PC I am using is a work laptop which has been secured down to
the max. I previously had local administrator rights but these have
been recently removed but I can't see how this would just stop the
script running?

I cannot find anything in the Apache error log and there is nothing in
the MySQL *.err file. I have tried increasing the value of
memory_limit in my php.ini file but to no avail. I have inserted some
tracing into the function to report where the script gets to and have
found that the script keeps failing around the same record - sometimes
it fails a couple of records before or a couple of records after.

I am now stumped for ideas.

Someone please help.......
Jul 17 '05 #1
4 2850
Damien Renwick wrote:
I have a php script which simply stops midway through a while loop
that processes records returned by a MySQL query. The HTML page
continues trying to load the page but the php has stopped running and
eventually I get a timeout. The script is running in my development
environment which consists of php 4.3.4, Apache 1.3.28 and MySQL
4.0.17, installed on Windows XP with Service Pack 2.

I suspect that there may be a problem with my installation
configuration for a number of reasons:
- I have a new PC and had to re-install php, Apache and MySQL
- The script executed perfectly on my old PC (which I no longer have)
using the same versions of php etc.
- The script executes perfectly in my production environment (which is
running on a Linux server using Apache and MySQL)
- The PC I am using is a work laptop which has been secured down to
the max. I previously had local administrator rights but these have
been recently removed but I can't see how this would just stop the
script running?

I cannot find anything in the Apache error log and there is nothing in
the MySQL *.err file. I have tried increasing the value of
memory_limit in my php.ini file but to no avail. I have inserted some
tracing into the function to report where the script gets to and have
found that the script keeps failing around the same record - sometimes
it fails a couple of records before or a couple of records after.

I am now stumped for ideas.

Someone please help.......


I believe the default time limit for PHP scripts is 30 seconds. You can
change that at runtime with set_time_limit(number of seconds), where
set_time_limit(0) means no limit.

By the way, you're not the local administrator of your own development
machine? I don't envy you, I can't imagine having to work like that.

JP

--
Sorry, <de*****@cauce.org> is a spam trap.
Real e-mail address unavailable. 5000+ spams per month.
Jul 17 '05 #2
I had the same problem and when i used set_time_limit(0), the problem was
not resolved!
It just moved away to 60 seconds. When 60 seconds passed, the connection
would be
closed, no matter what. :-( Does anyone know how to fix this?
"Jan Pieter Kunst" <de*****@cauce.org> wrote in message
news:42*********************@news.xs4all.nl...
Damien Renwick wrote:
I have a php script which simply stops midway through a while loop
that processes records returned by a MySQL query. The HTML page
continues trying to load the page but the php has stopped running and
eventually I get a timeout. The script is running in my development
environment which consists of php 4.3.4, Apache 1.3.28 and MySQL
4.0.17, installed on Windows XP with Service Pack 2.

I suspect that there may be a problem with my installation
configuration for a number of reasons:
- I have a new PC and had to re-install php, Apache and MySQL - The
script executed perfectly on my old PC (which I no longer have)
using the same versions of php etc.
- The script executes perfectly in my production environment (which is
running on a Linux server using Apache and MySQL)
- The PC I am using is a work laptop which has been secured down to
the max. I previously had local administrator rights but these have
been recently removed but I can't see how this would just stop the
script running?

I cannot find anything in the Apache error log and there is nothing in
the MySQL *.err file. I have tried increasing the value of
memory_limit in my php.ini file but to no avail. I have inserted some
tracing into the function to report where the script gets to and have
found that the script keeps failing around the same record - sometimes
it fails a couple of records before or a couple of records after.

I am now stumped for ideas.

Someone please help.......


I believe the default time limit for PHP scripts is 30 seconds. You can
change that at runtime with set_time_limit(number of seconds), where
set_time_limit(0) means no limit.

By the way, you're not the local administrator of your own development
machine? I don't envy you, I can't imagine having to work like that.

JP

--
Sorry, <de*****@cauce.org> is a spam trap.
Real e-mail address unavailable. 5000+ spams per month.

Jul 17 '05 #3
Damien Renwick wrote:
I have a php script which simply stops midway through a while loop
that processes records returned by a MySQL query. The HTML page
continues trying to load the page but the php has stopped running and
eventually I get a timeout. The script is running in my development
environment which consists of php 4.3.4, Apache 1.3.28 and MySQL
4.0.17, installed on Windows XP with Service Pack 2.

<snip>
try playing with:

set_time_limt()
ignore_user_abort()
register_shutdown_function()
debug_backtrace()

HTH

C.
Jul 17 '05 #4
Colin McKinnon <co**************@andthis.mms3.com> wrote in message news:<d2*******************@news.demon.co.uk>...
Damien Renwick wrote:
I have a php script which simply stops midway through a while loop
that processes records returned by a MySQL query. The HTML page
continues trying to load the page but the php has stopped running and
eventually I get a timeout. The script is running in my development
environment which consists of php 4.3.4, Apache 1.3.28 and MySQL
4.0.17, installed on Windows XP with Service Pack 2.

<snip>
try playing with:

set_time_limt()
ignore_user_abort()
register_shutdown_function()
debug_backtrace()

HTH

C.


Thanks for all the advice, unfortunately, nothing has helped. FYI the
script stops running after about 0.1ms, yes, almost instantaneously
after processing a hand full of records.

Still seeking advice.....
Jul 17 '05 #5

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

Similar topics

6
by: Eric Walker | last post by:
I am a php beginner, so apologize if this question is silly. I am encountering apparently random script stops when I try to get a remote HTML file with either file() or fopen(). A typical code...
7
by: lawrence | last post by:
Suppose I create dynamic web pages with 3 functions (which call other functions to make everything happen, but these 3 you might think of as being the top layer): registerSessions();...
1
by: bayouprophet | last post by:
Cant get menu script to to put linked page in the same frame. I am new to Java and I am wondering what am I doing wrong? below are my java applet file, frame.html file, and my text file and one...
2
by: MatthewRoberts | last post by:
Howdy All, I have a Windows Service that often stops in its tracks with no exception and no explanation on our QA system. During testing on the development machine, it can handle any workload,...
9
by: mareal | last post by:
I have noticed how the thread I created just stops running. I have added several exceptions to the thread System.Threading.SynchronizationLockException System.Threading.ThreadAbortException...
3
by: Terry Olsen | last post by:
I have a windows service that has been running fine for almost 6 months. Last week, it just stopped working. It is still in the task list and still shows "started" in the service manager. There...
5
by: This | last post by:
I have a pretty basic emailing script that sends a relatively small number (150) of html emails. The emails are compiled, personalised from a mysql db subscribers list, and sent using mail() -...
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

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.