Re: [PHP] script failing at same line

2009-09-09 Thread Ben Dunlap
My solution was to add a table to my database, and add an insert job id into the table after the line that is causing the problem. When I submit the script I use setTimeout to run an AJAX query of the table 5 seconds later. If the line has failed the job id will not be in the table and I

Re: [PHP] script failing at same line

2009-09-08 Thread jim white
Ben, My solution was to add a table to my database, and add an insert job id into the table after the line that is causing the problem. When I submit the script I use setTimeout to run an AJAX query of the table 5 seconds later. If the line has failed the job id will not be in the table and I

RE: [PHP] script failing at same line

2009-09-04 Thread Jay Blanchard
[snip] I have a script that intermittently fails at the same line. I am trying to write some code that will throw an exception after 5 seconds if the command on that line fails and the script freezes. Any ideas? [/snip] I have lots of ideas! But those really won't help you :) We need to see

Re: [PHP] script failing at same line

2009-09-04 Thread jim white
$map = ms_newMapObj($mapfile); The command creates a new mapscript object. Jay Blanchard wrote: [snip] I have a script that intermittently fails at the same line. I am trying to write some code that will throw an exception after 5 seconds if the command on that line fails and the script

Re: [PHP] script failing at same line

2009-09-04 Thread Ben Dunlap
$map = ms_newMapObj($mapfile); The command creates a new mapscript object. And PHP is hanging somewhere inside that constructor? Is this in a web context or a command-line context? Or both?

Re: [PHP] script failing at same line

2009-09-04 Thread jim white
It's a web app that draws maps in a browser. Sometime it will generate a seg fault. The command should not take long, so if there is some script construct that will throw an exception after a few seconds if the command has not completed I could signal the user that the map will not draw and to

Re: [PHP] script failing at same line

2009-09-04 Thread Ben Dunlap
On Fri, Sep 4, 2009 at 2:38 PM, jim white jbw2...@earthlink.net wrote: It's a web app that draws maps in a browser. Sometime it will generate a seg fault. The command should not take long, so if there is some script construct that will throw an exception after a few seconds if the command has

Re: [PHP] script failing at same line

2009-09-04 Thread jim white
Hi, Thanks I'll look at libevent. I have also been thinking about using an XHR approach, but wonder how passing PHP references works with javascript. Jim Ben Dunlap wrote: On Fri, Sep 4, 2009 at 2:38 PM, jim white jbw2...@earthlink.net mailto:jbw2...@earthlink.net wrote: It's a web