RE: [PHP] Re: Cronjob

2002-09-26 Thread Ford, Mike [LSS]
> -Original Message- > From: Daren Cotter [mailto:[EMAIL PROTECTED]] > Sent: 25 September 2002 20:11 I know your real problem has been solved, but this might save you from wasting time inspecting the wrong line of code one day: > There isn't even a line 3 in the script: Errr... 1

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
Don, It was not there anywhere. --- Don Read <[EMAIL PROTECTED]> wrote: > > On 25-Sep-2002 Daren Cotter wrote: > > This just prints out a bunch of info (seems to be > > unimportant)...what am I looking for in this? > > > > You're looking for your argument string "blah" > > -- > Don Read

Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read
On 25-Sep-2002 Daren Cotter wrote: > This just prints out a bunch of info (seems to be > unimportant)...what am I looking for in this? > You're looking for your argument string "blah" -- Don Read [EMAIL PROTECTED] -- "Beer is proof that God loves us and w

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
This just prints out a bunch of info (seems to be unimportant)...what am I looking for in this? --- Don Read <[EMAIL PROTECTED]> wrote: > > On 25-Sep-2002 Daren Cotter wrote: > > Holy wowsers...about 5 pages of jibberish printed > out, > > and at the end: > > > > Warning: Nesting level too dee

Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read
On 25-Sep-2002 Daren Cotter wrote: > Holy wowsers...about 5 pages of jibberish printed out, > and at the end: > > Warning: Nesting level too deep - recursive > dependency? in test.php on line 3 > > There isn't even a line 3 in the script: > > var_dump($argv); > var_dump($GLOBALS); > ?> > S

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
Holy wowsers...about 5 pages of jibberish printed out, and at the end: Warning: Nesting level too deep - recursive dependency? in test.php on line 3 There isn't even a line 3 in the script: --- Don Read <[EMAIL PROTECTED]> wrote: > > On 25-Sep-2002 Daren Cotter wrote: > > Jason, > > > > Th

Re: [PHP] Re: Cronjob

2002-09-25 Thread Robert Cummings
Daren Cotter wrote: > > In any case, register_globals is ON for my server. > > I don't understand why this isn't working? I'm doing > exactly what the manual says. What could I be missing? No idea the following worked as expected for me: Script: Execute: php foo.php blah Output: X-Powered-B

Re: [PHP] Re: Cronjob

2002-09-25 Thread Don Read
On 25-Sep-2002 Daren Cotter wrote: > Jason, > > That's exactly what I'm trying to do, and it's not > working: > > My Script: >#!/usr/bin/php -f > $test = $argv[1]; > print $test; > $demo = "This Works"; > print $demo; > ?> > > Running: > ./test.php blah > > Yiels only "This Works", but not

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
In any case, register_globals is ON for my server. I don't understand why this isn't working? I'm doing exactly what the manual says. What could I be missing? --- Robert Cummings <[EMAIL PROTECTED]> wrote: > Nope, $GLOBALS remains as always... > > > http://www.php.net/manual/en/language.va

Re: [PHP] Re: Cronjob

2002-09-25 Thread Robert Cummings
Nope, $GLOBALS remains as always... http://www.php.net/manual/en/language.variables.predefined.php#language.variables.superglobals Cheers, Rob. Jason Young wrote: > > Jeez.. pardon me.. $_GLOBALS .. I don't know where I got SERVER from.. > *sleeps before posting from now on* > > -J > >

Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young
Jeez.. pardon me.. $_GLOBALS .. I don't know where I got SERVER from.. *sleeps before posting from now on* -J Jason Young wrote: > Correction.. isn't it $_SERVER and not $SERVER > > Jason Young wrote: > >> Daren, >> >> This post from Robert explains why you're having trouble :) >> >> I forgot

Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young
Correction.. isn't it $_SERVER and not $SERVER Jason Young wrote: > Daren, > > This post from Robert explains why you're having trouble :) > > I forgot the PHP version on my machine doesn't have the register_globals > problem. > > THAT should work. > > -Jason > >> >> I'm think you're all fo

Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young
Daren, This post from Robert explains why you're having trouble :) I forgot the PHP version on my machine doesn't have the register_globals problem. THAT should work. -Jason > > I'm think you're all forgetting about register_globals being off by > default these days... The following may hel

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
Robert, This does not work, but thanks anyway =) Script: Command Line: /usr/bin/php -f test.php blah Output: This Works --- Robert Cummings <[EMAIL PROTECTED]> wrote: > Jason Young wrote: > > > > I can't say I'm really too familiar with the php > commandline.. > > > > You're using /usr/b

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
I'm using a PHP script. I got a PHP script to run mysql queries no problem, but the trouble is I need to pass off arguments to the script (those arguments shape the queries). --- Mike Dunlop <[EMAIL PROTECTED]> wrote: > Darren, > > Do you want to use a shell script or a php page to > run your qu

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
Jason, That's exactly what I'm trying to do, and it's not working: My Script: #!/usr/bin/php -f Running: ./test.php blah Yiels only "This Works", but not "blah". I'm using version 4.0.6 --- Jason Young <[EMAIL PROTECTED]> wrote: > I can't say I'm really too familiar with the php > command

Re: [PHP] Re: Cronjob

2002-09-25 Thread Robert Cummings
Jason Young wrote: > > I can't say I'm really too familiar with the php commandline.. > > You're using /usr/bin/php (or equivalent) and attempting to use your > exec() that way? > > If you do 'php -?' you'll get a list of commands that you can use, and I > don't see a way to pass cmdline argume

Re: [PHP] Re: Cronjob

2002-09-25 Thread Mike Dunlop
Darren, Do you want to use a shell script or a php page to run your queries? - MD >Jason, > >I'm not using a web script any longer, I'm using >command-line (I determined that it is installed on the >server). > >I read about $argc and $argv, but when I call the >script passing two arguments, b

Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young
I can't say I'm really too familiar with the php commandline.. You're using /usr/bin/php (or equivalent) and attempting to use your exec() that way? If you do 'php -?' you'll get a list of commands that you can use, and I don't see a way to pass cmdline arguments as variables.. Having said th

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
Jason, I'm not using a web script any longer, I'm using command-line (I determined that it is installed on the server). I read about $argc and $argv, but when I call the script passing two arguments, both $argc and $argv are blank. Is this a php.ini setting I need to change or somethign? --- Ja

Re: [PHP] Re: Cronjob

2002-09-25 Thread Jason Young
Sorry to butt in :) Arguments to web scripts are done in the format: page.php?arg1=data1&arg2=data2 So you would use that full string as the lynx path. Hope this helps :) -Jason Daren Cotter wrote: > Thanks for the info Chris, it works! > > How do I pass arguments to the script? I'm assuming

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
Thanks for the info Chris, it works! How do I pass arguments to the script? I'm assuming it'd just be: test.php arg1 arg2 The stuff I've read says $argc should be the count of the # of arguments, and $argv should be an array holding them...but when I do a simple: print "# of Arguments: $argc\n"

Re: [PHP] Re: Cronjob

2002-09-25 Thread Philip Hallstrom
-dump is an option to lynx to tell it to output the page and quits. the rest of it says send all output (and errors) to /dev/null On Wed, 25 Sep 2002, Daren Cotter wrote: > What does the "-dump" and ">/dev/null 2>&1" stuff do? > > --- Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > You could se

Re: [PHP] Re: Cronjob

2002-09-25 Thread Chris Hewitt
> > >On Wed, 25 Sep 2002, Daren Cotter wrote: > >> >>My problem, is that I absolutely NEED to run a PHP >>script using crontab. The script needs to send >>numerous queries to a database every hour. Is there >>any way I can accomplish this, directly or indirectly? >> Are you sure its not already th

Re: [PHP] Re: Cronjob

2002-09-25 Thread Daren Cotter
What does the "-dump" and ">/dev/null 2>&1" stuff do? --- Philip Hallstrom <[EMAIL PROTECTED]> wrote: > You could setup cron to run lynx or some other > command line web browser... > something like: > > 0 * * * * /path/to/lynx -dump > http://server/path/to/script.php >/dev/null 2>&1 > > Then as