> -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
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
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
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
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
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
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
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
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
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
>
>
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
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
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
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
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
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
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
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
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
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
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
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"
-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
>
>
>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
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
25 matches
Mail list logo