Addressed to: <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from <[EMAIL PROTECTED]> Mon, 26 Feb 2001 15:58:19 -0500
>
> hi all,
>
> thanks for the replies.  many of you asked why I want to use php4 as a cgi.
>
> basically it boils down to this, using PHP as CGI you can run PHP
> scripts  via cron tab, which eliminates the need for shell scripting
> (yeah baby).

In that case, compile php without using  with-apache or with-apxs to
create a php binary.  Place it in /usr/local/bin or someplace in your
path.


There is a way to run php from cron something like:

   /usr/local/bin/php -q script-name.php


The way I do it is a little different.  In cron I specify:


  /path/to/php/script.php


In the top of script.php, I add a special first line:

--------------------------------
#!/usr/local/bin/php -q
<?
phpinfo();
?>
--------------------------------

The important thing to remember here, it has NOTHING to do with Apache
or CGI, you are using standard shell operations to allow php to execute
scripts the same way most perl scripts, and a lot of other scripts are
run.




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to