RE: [PHP] Php shell scripting [SOLVED]

2003-12-10 Thread Jake McHenry
> -Original Message- > From: Evan Nemerson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 10, 2003 9:32 PM > To: Jake McHenry; [EMAIL PROTECTED] > Subject: Re: [PHP] Php shell scripting > > > On Thursday 11 December 2003 12:31 am, Jake McHenry wrote: &g

Re: [PHP] Php shell scripting

2003-12-10 Thread Evan Nemerson
On Thursday 11 December 2003 12:31 am, Jake McHenry wrote: > Does anyone know how I can pass variables into a script being executed > from the command line? > > I have a script, named testscript. So far, I have been getting all my > variables from the system env command, not a big deal. But I want

Re: [PHP] Php shell scripting

2003-12-10 Thread Robert Cummings
$argv, possibly $_SERVER['argv']. Cheers, Rob. On Thu, 2003-12-11 at 00:31, Jake McHenry wrote: > Does anyone know how I can pass variables into a script being executed > from the command line? > > I have a script, named testscript. So far, I have been getting all my > variables from the system

[PHP] Php shell scripting

2003-12-10 Thread Jake McHenry
Does anyone know how I can pass variables into a script being executed from the command line? I have a script, named testscript. So far, I have been getting all my variables from the system env command, not a big deal. But I want to input a username into the script, like testscript jmchenry. In b

Re: [PHP] PHP shell scripting not working right?

2002-12-16 Thread Marek Kilimajer
You don't have ./ in your $PATH so you must type ./test.php to execute it Leif K-Brooks wrote: I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have the following script: #!/usr/bin/php -q print "Success!\n"; ?> It's saved as test.php and CHMODed to 777. When

Re: [PHP] PHP shell scripting not working right?

2002-12-16 Thread Marco Tabini
In Unix you need to specify the working folder when you are launching an executable, otherwise Bash will try to look into its search path, which does not include the current folder. Try: ./test.php That should work. BTW--running "test" by itself only *looks* like hitting enter--it's really a vali

Re: [PHP] PHP shell scripting not working right?

2002-12-16 Thread Leif K-Brooks
Ever answered your own question five seconds after asking it? Apparently, I have to type "/path/to/test.php" even though I'm already in the right directory. Leif K-Brooks wrote: I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have the following script: #!/usr

[PHP] PHP shell scripting not working right?

2002-12-16 Thread Leif K-Brooks
I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have the following script: #!/usr/bin/php -q print "Success!\n"; ?> It's saved as test.php and CHMODed to 777. When I type "test.php" at the command line, it says: bash: test.php: command not found When I type

Re: [PHP] Shell scripting

2001-12-10 Thread Rouvas Stathis
Start php with -q, eg: php -q script.php -Stathis. Dan McCullough wrote: > > I am setting up a shell script to provide a menu for some tasks that our server >admin would like > to do via script rather then vi'ing the file, now I am almost finished but I would >like to get rid > of this ugly p

[PHP] Shell scripting

2001-12-10 Thread Dan McCullough
I am setting up a shell script to provide a menu for some tasks that our server admin would like to do via script rather then vi'ing the file, now I am almost finished but I would like to get rid of this ugly part of the output. X-Powered-By: PHP/4.0.4pl1 Content-type: text/html Is there away

[PHP] Re: PHP shell scripting..

2001-07-22 Thread
In article <001c01c112da$b8c0d420$0d6fa8c0@local>, Ryan Christensen wrote: >I have some questions about using PHP as a shell scripting language... >mainly how you pass arguments to a script on the command line. Say I'm >using: > >-- >#!/usr/local/bin/php -q > >print "I am:

RE: [PHP] PHP shell scripting..

2001-07-22 Thread Ryan Christensen
- Ryan Christensen > -Original Message- > From: Kees Hoekzema [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 22, 2001 11:41 AM > To: Ryan Christensen > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] PHP shell scripting.. > > > Hello Ryan, > > Let me gi

RE: [PHP] PHP shell scripting..

2001-07-22 Thread Kees Hoekzema
gt; From: Ryan Christensen [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 22, 2001 8:30 PM > To: 'Kees Hoekzema' > Subject: RE: [PHP] PHP shell scripting.. > > > I'm slightly confused as to how I would run this from a shell though.. > what would I enter in the comma

RE: [PHP] PHP shell scripting..

2001-07-22 Thread Kees Hoekzema
age- > From: Ryan Christensen [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 22, 2001 8:19 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP shell scripting.. > > > I have some questions about using PHP as a shell scripting language... > mainly how you pass arguments to a scrip

[PHP] PHP shell scripting..

2001-07-22 Thread Ryan Christensen
I have some questions about using PHP as a shell scripting language... mainly how you pass arguments to a script on the command line. Say I'm using: -- #!/usr/local/bin/php -q -- How do I define test from the command line (as an argument while e

Re: [PHP] Shell scripting and PHP.

2001-07-03 Thread Brad Hubbard
On Tue, 3 Jul 2001 17:46, Ray Hilton wrote: > I think it's the same as perl, using the backtick operator, ie: > > $result = `uptime`; > > That's ` NOT ' > Look at passthru() exec() and system() as well. Cheers, Brad -- Brad Hubbard Congo Systems 12 Northgate Drive, Thomastown, Victoria, Austra

[PHP] Shell scripting and PHP.

2001-07-03 Thread Johan Vikerskog (ECS)
Hi all! If i want to use some shell commands and use the result it displays to set a variable. How is this done? Is there a way of doing it like you can do with Perl? Anyone knows? Thanks for all the tips you can give me, or better yet, if you know of a tutorial somewere that covers this. //

RE: [PHP] Shell scripting and PHP.

2001-07-03 Thread Ray Hilton
I think it's the same as perl, using the backtick operator, ie: $result = `uptime`; That's ` NOT ' -Original Message- From: Johan Vikerskog (ECS) [mailto:[EMAIL PROTECTED]] Sent: 03 July 2001 09:41 To: [EMAIL PROTECTED] Subject: [PHP] Shell scripting and PHP. Hi all

Re: [PHP] Help with PHP Shell Scripting

2001-01-19 Thread Brian Clark
Hello Justin, (JY == "Justin Yu") [EMAIL PROTECTED] writes: JY> When I tried connecting to Postgres through a shell script that I JY> wrote, I get the following error: JY> "Fatal error: Call to undefined function: pg_connect()" Because you don't have pgsql (PostgreSQL) support built into you

[PHP] Help with PHP Shell Scripting

2001-01-18 Thread Justin Yu
Hi, When I tried connecting to Postgres through a shell script that I wrote, I get the following error: "Fatal error: Call to undefined function: pg_connect()" After searching the web for a solution, I realized that I have to compile PHP into its CGI version. Currently, PHP is installed as an