[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-developers] re: PHP via CRON



Regarding running PHP scripts via CRON:
1) I tried using the Lynx solution previously, but my RaQ doesn't have Lynx
installed. Can the RPM be installed somwhere from the Cobalt site.
2) I also like the LWP answer below, but LWP isn't installed on my system
either. Can I get that somewhere?

I really don't want to try the PHP/CGI answer. I tried it before on another
server, and I could never get it installed right.

Thanks for your time.
David
 
> Message: 7
> To: cobalt-developers@xxxxxxxxxxxxxxx
> Reply-To: David Dotson <sneaky@xxxxxxxxxxxxxx>
> From: David Dotson <sneaky@xxxxxxxxxxxxxx>
> Date: Wed, 29 Mar 2000 10:06:59 AST
> Subject: [cobalt-developers] PHP scripts via CRON
> Reply-To: cobalt-developers@xxxxxxxxxxxxxxx
> 
> Has anybody successfully setup a PHP script to run as a CRON process on a

> RaQ?
> 
> 
> --__--__--
> 
> Message: 8
> From: "Francesc Leveque" <francesc@xxxxxxxxxxxxxxxxxxxxx>
> To: <cobalt-developers@xxxxxxxxxxxxxxx>
> Subject: RE: [cobalt-developers] PHP scripts via CRON
> Date: Wed, 29 Mar 2000 16:24:53 +0200
> charset="iso-8859-1"
> Reply-To: cobalt-developers@xxxxxxxxxxxxxxx
> 
> I think you can execute this php using the text navigator "lynx" and
> redirecting output to /dev/null...
> 
> lynx xxxx/xxxxx.php3 > /dev/null
> 
> Please, I don't know how it works, so read a little about lynx before try

> it.
> 
> Francesc Leveque ( francesc@xxxxxxxxxxxxxxxxxxxxx )
> Director Técnico
> Interweb Research. ( http://www.interweb-research.net )
> Travessera de Gracia, 342-344 6ªpta
> 08025 Barcelona
> Tel 93 4465015   Fax 93 4465034
> 
> 
> --__--__--
> 
> Message: 9
> From: "Nils Koesters" <koesters@xxxxxxxxxxx>
> To: <cobalt-developers@xxxxxxxxxxxxxxx>
> Subject: Re: [cobalt-developers] PHP scripts via CRON
> Date: Wed, 29 Mar 2000 15:53:22 +0100
> charset="iso-8859-1"
> Reply-To: cobalt-developers@xxxxxxxxxxxxxxx
> 
> I do proceed like this since a year on www.biologie.de (Suse Linux) not
> on a
> RAQ.
> 
> Lynx -source will output the suff to std then depending what you want to
> do
> redirect that to a webpage or to /dev/null/.
> 
> Piece of Cake :-)
> 
> Nils
> 
> 
> --__--__--
> 
> Message: 10
> Reply-To: <messier@xxxxxxxxxxxxxxxx>
> From: "Ray Messier" <messier@xxxxxxxxxxxxxxxx>
> To: <cobalt-developers@xxxxxxxxxxxxxxx>
> Subject: RE: [cobalt-developers] PHP scripts via CRON
> Date: Wed, 29 Mar 2000 08:11:35 -0800
> charset="iso-8859-1"
> Reply-To: cobalt-developers@xxxxxxxxxxxxxxx
> 
> Here is what I do to run my PHP via a cron job
> 
> I set up a shell script to run via cron, in the shell script I have
> perl ~atrain/public_html/conductor.pl
> 
> In the conductor.pl perl script I have, just snarf a copy of the LWP
> modules
> and it works very good
> #!/bin/perl
> # Purpose: Runs the ATrain Conductor files
> use LWP::Simple;
> 
> $p = get "http://127.0.0.1/conductor.php";;
> print $p;
> 
> 
> --__--__--
> 
> Message: 11
> Date: Wed, 29 Mar 2000 09:35:54 -0500
> To: cobalt-developers@xxxxxxxxxxxxxxx
> From: fred <fwunder@xxxxxxxxxxxxxxxxxxxx>
> Subject: Re: [cobalt-developers] PHP scripts via CRON
> Reply-To: cobalt-developers@xxxxxxxxxxxxxxx
> 
> At 10:06 AM +0000 3/29/00, David Dotson wrote:
> >Has anybody successfully setup a PHP script to run as a CRON process on
> a
> >RaQ?
> >
> 
> I wrote this up for a different list last week. It may be helpful here.
> 
> ----------------------------------------------------
> 
> I did this on a couple of different Cobalt boxes which I have comlete
> control over (Cobalt RaQ2 and Qube2).
> 
> First I compiled PHP. It doesn't hurt to run two different compilations
> of
> PHP on the same machine. You can even run two different versions. My
> boxes
> are running mod_php3, so I needed to compile php as a "cgi" to use
> command-line scripting such as PhorumMail. Anyway, I happened to have the

> PHP 3.0.14 source sitting around, so I simply:
> 
> ./configure --with-mysq --enable-track-vars
> make
> make install
> 
> This moved php to /usr/local/bin
> 
> To test and make sure php was working use our little test.script friend:
> 
> #!/usr/local/bin/php -q
> <?php
> 
>     print( "Hello, world!\n");
> 
> ?>
> 
> Make sure it is executable (chmod +x test.script) and /usr/local/bin is
> in
> your $PATH.
> 
> ./test.script should return -> Hello, world
> 
> You will also need to determine if your system is using smrsh (RaQ2). I
> believe, on most red hat installs, it would be /etc/smrsh. On my boxes
> (RaQ2), it's /usr/adm/sm.bin/. If it is using smrsh, you'll need to
> symbolically link php in that directory for sendmail to have access to
> php.
> 
> From /usr/adm/sm.bin/
> 
> [root sm.bin]# ln -s /usr/local/bin/php
> 
> There is a recent article at:  http://www.phpbuilder.com which you might
> want to peruse with regard to command line php.
> 
> Usual disclaimers apply.
> 
> -fred
>