Home »
Imported messages »
comp.lang.php »
Cronjob Apache module v CGI
Re: Cronjob Apache module v CGI [message #170616 is a reply to message #170613] |
Wed, 10 November 2010 13:38 |
Matthew Leonhardt
Messages: 9 Registered: November 2010
Karma:
|
Junior Member |
|
|
"+mrcakey" <webmaster(at)listyblue(dot)com> wrote in message
news:ibdtco$god$1(at)news(dot)albasani(dot)net...
> I seem to remember strong opinions were expressed (possibly by Jerry
> Stuckle) over which was best for running cronobs and I think at the time I
> nodded and thought they were very valid points. I think CGI was the way to
> go?
Methinks you're confusing CGI (Common Gateway Interface) with CLI (Command
Line Interface).
> I'm about to build a script to query the sessions database and clean up
> reserved items that the customer didn't follow through on.
>
> I currently have PHP running as an Apache module and I'm not as
> comfortable as I'd like to be in Linux so would like to avoid fiddling if
> the security implications are not overwhelmingly pro-CGI.
Running CLI scripts is entirely independant of apache. Why would you need
to involve a web server in a background script?
> As a side, and this will undoubtedly reveal the level of my Linux/Apache
> ignorance, is it possible to have PHP bound into Apache for the customer
> facing/HTTP side of things and also create a CGI interface for the
> cronjobs?
I suppose it's possible, but I can't think of a good reason to do it. Try
the following at the command line:
which php
Should tell you if you have a php CLI binary installed. It's usually in
/usr/bin/php or /usr/local/bin/php, depending on your installation.
then, you can run any of your scripts like so:
php scriptName.php arg1 arg2
|
|
|
Goto Forum:
Current Time: Fri Nov 22 11:59:38 GMT 2024
Total time taken to generate the page: 0.04682 seconds