[PHP] Run webscript from command line

2002-11-14 Thread Aate Drageset
Not specifically php-problem, but..
How could i run a php-script from command line (cron.daily) using no GUI or X ??
There should be some way of using a browser or comparable.
my PHP is not enabled for command line script.
Regards Aate Drageset



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Run webscript from command line

2002-11-14 Thread Adam Williams
0 0 * * * lynx http://whatever/blah.php ; sleep 5; killall -9 lynx

Adam

On Thu, 14 Nov 2002, Aate Drageset wrote:

 Not specifically php-problem, but..
 How could i run a php-script from command line (cron.daily) using no GUI or X ??
 There should be some way of using a browser or comparable.
 my PHP is not enabled for command line script.
 Regards Aate Drageset






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Run webscript from command line

2002-11-14 Thread David T-G
Aate --

...and then Aate Drageset said...
% 
% Not specifically php-problem, but..
% How could i run a php-script from command line (cron.daily) using no GUI or X ??
% There should be some way of using a browser or comparable.

Have you tried lynx, links, w3m, or the like?  Something like

  lynx -dump http://host/script.php  /path/to/output.file

should run the script, dump the output somewhere (perhaps /dev/null), and
exit.


% my PHP is not enabled for command line script.

That's also a problem :-)


% Regards Aate Drageset


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg85760/pgp0.pgp
Description: PGP signature


Re: [PHP] Run webscript from command line

2002-11-14 Thread Ernest E Vogelsinger
At 18:36 14.11.2002, Adam Williams spoke out and said:
[snip]
0 0 * * * lynx http://whatever/blah.php ; sleep 5; killall -9 lynx
[snip] 

I believe it's better to let lynx decide when the page is done:

0 0 * * * lynx -dump http://whatever/blah.php 21  /dev/null


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] Run webscript from command line

2002-11-14 Thread John Nichel
One way would be to use lynx.  Another way is to compile php as a cgi as 
well as a module.  Whenever I install / upgrade php on one of my 
systems, I compile it twice, with all the same options, save 
--with-apache.  When you don't compile it with a webserver, you'll get 
the php executable, which I just move to somewhere like /usr/bin, and 
then you can run the script like this

/usr/bin/php myscript.php

Aate Drageset wrote:
Not specifically php-problem, but..
How could i run a php-script from command line (cron.daily) using no GUI or X ??
There should be some way of using a browser or comparable.
my PHP is not enabled for command line script.
Regards Aate Drageset






--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php