Script stops running during while()

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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.......

Re: Script stops running during while()

Damien Renwick wrote:
Quoted text here. Click to load it

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.


Real e-mail address unavailable. 5000+ spams per month.

Re: Script stops running during while()

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?

Quoted text here. Click to load it

Re: Script stops running during while()

Damien Renwick wrote:

Quoted text here. Click to load it
try playing with:




Re: Script stops running during while()

Quoted text here. Click to load it

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.....

Site Timeline