[FX.php List] After the Submit
Jonathan Schwartz
jschwartz at exit445.com
Thu Sep 25 08:38:17 MDT 2008
Thanks for the education, Leo.
I can now see why the edit to the script did not work. ;-)
At the same time, I think I see an easy answer if the script is
designed to check a given value in FMP or text file to continue
looping. It could be access via simple relationship to a one record
table or value in a text file. Probably wouldn't build this into
every script, but I have a couple of likely candidates.
I'll give it a try.
Thanks
Jonathan
At 3:30 PM +0200 9/25/08, Leo R. Lundgren wrote:
>The server and client communicating via HTTP is quite a basic thing,
>so there isn't much support for these kind of things by default.
>When your browser sends it requests you have time to cancel that
>before the request to the server completes, but that's not your
>scenario. In order to cancel a long-running script on the server you
>would need some form of application server that maintains state and
>where you have code that can affect other threads/requests that are
>currently processing, assuming your application is more than just a
>simple PHP page which is quite procedural. So in short, I believe
>(correct me if I'm wrong :) that you need something quite different
>from a PHP page.
>
>I haven't tried if myself, but the thought of having your script
>records its state somewhere, in a file or a database, and then have
>the possibility to (from the browser) ask another script running as
>the same user on the server to send a termination signal (this would
>be in the operating system) to the running process, might work? This
>would probably require something else than an Apache server with
>mod_php, for example PHP running via FCGI and without restrictions
>in what it can do using system calls. Well, I don't know how
>feasable this is, and I doubt it's of interest in any case; It would
>just be a bad workaround for something that needs redesign.
>
>Regarding when you edited your script; You didn't notice any change
>in the running script since it had already been loaded and parsed by
>the PHP engine. Only subsequent requests would load the new/edited
>script.
>
>That's my take on it. I'm eager to hear if anyone know of a solution
>that I don't know of? :)
>
>
>25 sep 2008 kl. 15.19 skrev Jonathan Schwartz:
>
>>Hi Folks,
>>
>>Another one of those nagging questions...
>>
>>What server control is available from browser after hitting the
>>submit button, if any? Is there any way to Cancel an executing
>>script?
>>
>>Say we have a script that runs long by design such as an emailing
>>routine. Or, a script that is supposed to run fast, but is hanging.
>>
>>The browser has an "X" button (Safari), but I'm confident that that
>>just tells the browser to stop the download of the current page.
>>It doesn't tell the server to do the same, does it?
>>
>>On one misbehaving script, I had time to go in edit the looping
>>script (while it was executing) and added an exit in the loop. It
>>didn't seem to work.
>>
>>This is probably more applicable during development than production.
>>Just asking.
>>
>>Jonathan
>>--
>>Jonathan Schwartz
>>Exit 445 Group
>>jonathan at exit445.com
>>http://www.exit445.com
>>415-370-5011
>>_______________________________________________
>>FX.php_List mailing list
>>FX.php_List at mail.iviking.org
>>http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>-|
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011
More information about the FX.php_List
mailing list