473,729 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2885
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******** *************@n ews.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_abo rt()
register_shutdo wn_function()
debug_backtrace ()

HTH

C.
Jul 17 '05 #4
Colin McKinnon <co************ **@andthis.mms3 .com> wrote in message news:<d2******* ************@ne ws.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_abo rt()
register_shutdo wn_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
1989
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 snippet: echo 'here we go...'; $handle=fopen($url,'r'); echo 'and here we are'; if ($handle==FALSE)
7
7823
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(); sendHtmlToBrowsers(); incrementPageViews(); Is there any chance that incrementPageViews() will be executed? Or, to
1
3255
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 of my link file that should load next to the menu on the same page. And Thank You in advance. Here is my menu applet: <html>
2
507
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, and complete with no problems. Even during testing on another test machine, it can handle any workload, and complete with no problems. This behavior has been tested multiple times.
9
3077
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 System.Threading.ThreadInterruptedException System.Threading.ThreadStateException to see if I could get more information about why the thread stops running but that code is never executed. Any ideas on how I can debug this?
3
1412
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 are no exceptions thrown, it just seems to have fell asleep. The service runs in a loop that checks about 80 servers on a daily basis to see what the status of the previous nights backup job is. It downloads the zipped log files from each...
5
3484
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() - after sending, a small summary html page is sent to the user with number sent, time taken and a simple navigation choice. Up to about 100 emails it all works fine - this takes the server about 27 secs . Any more than that and although the emails are...
5
2862
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 and then stops or refreshes the browser before the script had time to finish will Apache kill the script mid execution or will it let it finish ? I ask this stupid question because this seems to be happening in one
1
47471
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 on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
9426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.