LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2004, 04:51 AM   #1
iman00b
LQ Newbie
 
Registered: Sep 2004
Distribution: RH
Posts: 2

Rep: Reputation: 0
Pass Parameters to php from bash


Hi i'm trying to pass parameters to a php script called from command line

so i have a test.sh script that is like this

OUT=`php -q prova.php?P1=test`
echo $OUT


and a php script, prova.php,that is

...

$get = $P1;

.....

echo $get;
....



but something isn't working... what

ty 4 help
 
Old 09-09-2004, 12:50 PM   #2
thebover
Member
 
Registered: Jul 2004
Location: Canada
Distribution: suse 9.1/knoppix/slackware
Posts: 60

Rep: Reputation: 15
I am misunderstanding your request, are you trying to call a command from a php website, to run on your local machine? or are you trying to run a local script to load a php document?
 
Old 09-09-2004, 05:30 PM   #3
iman00b
LQ Newbie
 
Registered: Sep 2004
Distribution: RH
Posts: 2

Original Poster
Rep: Reputation: 0
i've done it by myself thanks

the problem was that the register_globals and register_argv were set to false, so passing parameters to a php script from a command line was not working, i've created a php.ini for my enviorment and all works fine
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass on boot parameters Slack 10.1 tdking19 Slackware 3 03-21-2005 10:41 AM
Spaces in bash parameters rose_bud4201 Programming 5 03-11-2005 06:57 AM
how do I pass special parameters to the kernel at startup? Falafel Fedora 4 01-19-2004 06:49 PM
pass parameters to shell scripts ? qwijibow Linux - Newbie 2 08-07-2003 07:27 AM
howto pass parameters to modules Sammy2ooo Linux - Software 5 07-01-2003 08:30 PM


All times are GMT -5. The time now is 09:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration