Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-09-2004, 05:51 AM   #1
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 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, 01:50 PM   #2
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, 06:30 PM   #3
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


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 11:41 AM
Spaces in bash parameters rose_bud4201 Programming 5 03-11-2005 07:57 AM
how do I pass special parameters to the kernel at startup? Falafel Fedora 4 01-19-2004 07:49 PM
pass parameters to shell scripts ? qwijibow Linux - Newbie 2 08-07-2003 08:27 AM
howto pass parameters to modules Sammy2ooo Linux - Software 5 07-01-2003 09:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:45 AM.

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