Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jason Wong
On Friday 17 May 2002 18:11, Henry Grech-Cini wrote: Hi All, Is this possible? Yes, compile php as a stand-alone binary, see manual for details. I really don't want to go back to perl5 to setup an autoresponder system! -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jon Haworth
Hi Henry, Is this possible? yup. Set your cron job up as lynx -dump http://www.myserver.com/myscript.php /dev/null (or pipe it to a logfile if you fancy) - obviously, you'll need lynx installed for this to work :-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Brian McGarvie
yip it's possible in exactly the same way as you would Perl, use: #/path/to/php /* php code */ eof and add it to cron as you would a perl script -Original Message- From: Henry Grech-Cini [mailto:[EMAIL PROTECTED]] Sent: 17 May 2002 11:12 AM To: [EMAIL PROTECTED] Subject:

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
Set your cron job up as lynx -dump http://www.myserver.com/myscript.php /dev/null (or pipe it to a logfile if you fancy) - obviously, you'll need lynx installed for this to work :-) but this is only needed only if you compile php into apache or am i wrong? if i have the cgi version

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Brian McGarvie
correct... -Original Message- From: Michael Virnstein [mailto:[EMAIL PROTECTED]] Sent: 17 May 2002 12:57 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Using php as a scripting language within cron jobs? Set your cron job up as lynx -dump http://www.myserver.com/myscript.php

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jon Haworth
Hi Michael, Set your cron job up as lynx -dump http://www.myserver.com/myscript.php /dev/null (or pipe it to a logfile if you fancy) - obviously, you'll need lynx installed for this to work :-) but this is only needed only if you compile php into apache or am i wrong? if i have the

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jay Blanchard
[snip] but this is only needed only if you compile php into apache or am i wrong? if i have the cgi version installed, i can call the php script directly from the shell. The only thing for me to do then, is to set #!/path.to/php in the first line of the script, right? [/snip] Can you have

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Robert Cummings
Jay Blanchard wrote: [snip] but this is only needed only if you compile php into apache or am i wrong? if i have the cgi version installed, i can call the php script directly from the shell. The only thing for me to do then, is to set #!/path.to/php in the first line of the script,

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
afaik yes. The module version should be called if apache has been requested with one of the reqistered php file types. the cgi version can be used as shell interpreter. the only thing that can smash th whole thing imo, is if you try to use the cgi version via web if you have php also installed as

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
the only thing that can smash th whole thing imo, is if you try to use the cgi version via web if you have php also installed as apache module. if anyone has infos here, it'll be really nice. Regards Michael Michael Virnstein [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Robert Cummings
Michael Virnstein wrote: afaik yes. The module version should be called if apache has been requested with one of the reqistered php file types. the cgi version can be used as shell interpreter. the only thing that can smash th whole thing imo, is if you try to use the cgi version via web

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jay Blanchard
[snip] Works well, and if your using libraries of code, you can share between the web module and the cgi. his is what I do, and sometimes I run a daemon to update a cache, so that the web module never needs to hang the user while it retrieves data from a remote site. [/snip] Too cool, I will

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Dan Hardiker
[snip] but this is only needed only if you compile php into apache or am i wrong? if i have the cgi version installed, i can call the php script directly from the shell. The only thing for me to do then, is to set #!/path.to/php in the first line of the script, right? [/snip] Can

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Dan Hardiker
the only thing that can smash th whole thing imo, is if you try to use the cgi version via web if you have php also installed as apache module. but all of what i wrote is a guess, never tried by myself. You can do all of the following simultaniously without and clashes: * Use PHP as an

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Dan Hardiker
Set your cron job up as lynx -dump http://www.myserver.com/myscript.php /dev/null (or pipe it to a logfile if you fancy) - obviously, you'll need lynx installed for this to work :-) but this is only needed only if you compile php into apache or am i wrong? if i have the cgi version

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread James E. Hicks III
#!/path.to/php -q I'd like to suggest the -q option for PHP shell scripts, which I rely on every day. James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Michael Virnstein
-q? this is for disabling the html headers, right? James E. Hicks III [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... #!/path.to/php -q I'd like to suggest the -q option for PHP shell scripts, which I rely on every day. James -- PHP General

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Dan Hardiker
#!/path.to/php -q I'd like to suggest the -q option for PHP shell scripts, which I rely on every day. Sh!! We dont want to give away *everything* heh... bah ... well I might as well give you the rest of the info. [14:03:50][dhardiker@amnesiac]:~$ php -? Usage: php [-q] [-h] [-s

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jared Boelens
I personally have never come across the method that is involved in compiling PHP as a binary, but I have come up with a way to run PHP scripts from the Command Line and Cron without the binary. from the cron I would call this command... wget -q -T10 http:/www.mydomain.com/myScript.php -0

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Dan Hardiker
from the cron I would call this command... wget -q -T10 http:/www.mydomain.com/myScript.php -0 /dev/null I have never had a problem with this method, although I am sure it has a higher overhead than compiling as a binary and directly calling php. This method (again) is insecure in the

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Miguel Cruz
On Fri, 17 May 2002, Dan Hardiker wrote: from the cron I would call this command... wget -q -T10 http:/www.mydomain.com/myScript.php -0 /dev/null This makes it highly insecure as anyone could execute it (unless you locked it down which is silly when you could just run it locally