Re: Starting a long php script from a web page



Well, I figured it out. The secret is to redirect the output to a file and
use an ampersand to put it into the background.

$ php myphpscript.php > myfile.txt &

Thanks for the ideas though!
Jeff


"Jeff" <bigjman_99@xxxxxxxxx> wrote in message
news:8JsFe.45803$s54.13380@xxxxxxxxxxx
> Hi,
>
> I have php script that takes several hours to run and I'd like to start it
> from a web page. I've tried to use include and the system() function to
> call the script directly but it still waits for it to finish.
>
> Anyone know how to call a script and get on with it?
>
> Thanks!
> Jeff
>


.



Relevant Pages

  • Re: $_SERVER[DOCUMENT_ROOT] and IIS
    ... Jeff escribió: ... Is it possible to set this in the php environment so I don't have to add it to every script. ...
    (comp.lang.php)
  • Re: [PHP] PHP console script vs C/C++/C#
    ... My script is taking a longer time to execute than I want. ... I prefer to write in PHP because that is what I know best. ... This is why I am thinking about rewriting my whole script in a C language. ... Perhaps there are different methods I could be using to speed up execution. ...
    (php.general)
  • Re: How to Add a Feeback Form
    ... I saw nothing in that script that indicates where the form is e-mailed to so ... Greg Maxey/Word MVP ... PHP or not. ... have the support available yet. ...
    (microsoft.public.frontpage.programming)
  • How best to show PHP source? (was: One page, multiple submit buttons)
    ... script to add to the top of a PHP script to enable showing its ... Maybe anybody submitting their own PHP code for critique here ... Anything posted to a newsgroup is a "snapshot" of what the ... there ought to be a FAQ for this ...
    (comp.lang.php)
  • Re: [PHP] PHP console script vs C/C++/C#
    ... My script is taking a longer time to execute than I want. ... I prefer to write in PHP because that is what I know best. ... thinking about rewriting my whole script in a C language. ... execution of the code. ...
    (php.general)