[PLUG] command line php execution

Michael Smith codeyeti at yahoo.com
Thu Jun 20 00:43:56 UTC 2002


Sure, install the cgi version of php, that makes an executable php that you
can use in a script with #!/bin/php just like a regular shell script.

There also is a php shell... look around for it.
--Mike

Derek Loree wrote:

> Hi All,
>
> I've got another problem that I need ideas for.  I would like to be able
> to have a php script (or program -- I'm not sure what to call it) run as
> a cron job.  From what I can tell, the interpreter has to be run through
> the web server, which means that I need to be able to call a .php file
> from a command line browser, then have it die when the php script has
> finished doing the voodoo that it needs to do.  Calling the .php file is
> not a big problem, lynx does it well enough from a shell script, but
> convincing it to die at the appropriate time is more problematic.
>
> I'm sure this is possible, this is linux after all. I think what I need
> is to be able to grab the PID, stuff it in a variable, then kill that
> process.  I can't figure out how to grab the PID though.
>
> Are there other ways to get this job done?
>
> TIA
>
> Derek Loree
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug

--
"Ask a Soviet engineer to design a pair of shoes and he'll come up with
something that looks like the boxes that the shoes came in; ask him to make
something that will massacre Germans, and he turns into Thomas *Fscking*
Edison."  --Neal Stephenson, Cryptonomicon






More information about the PLUG mailing list