From:             echo15 at delirium dot ch
Operating system: Linux 2.4.20
PHP version:      4.3.4
PHP Bug Type:     Feature/Change Request
Bug description:  PHP (CLI) argument passing

Description:
------------
Hi Devs



I guess since 4.3.3 the arguments passed to PHP (CLI) are handled
differently. Here's an example:



test.php reads:

<?php print "text is ->".$text."<-\n" ?>



with php 4.3.2:

# php test.php "text=foobar"

->foobar<-



with php 4.3.3:

# php test.php "text=foobar"

-><-



The arguments are now found only in $argv. 



While this makes sense at first, some people use the PHP CLI to do
subrequests. Let's assume you have two webservers, one delivering WWW and
another one delivering WAP content.



The WAP server is doing a subrequest to the WWW server (using PHP CLI) and
piping the output through a conversion script 'html2wml'. In order for
this to work, the PHP CLI should hold an option to allow passing the
arguments to $_POST or $_GET instead of $argv.



I don't see a way to do this as of now but by adding code to the page on
the WWW server – which is most clumsy as this code is not needed for pages
delivered to a WWW user agent.



How about a command line argument like:



-x (--argv-to-request) xerox arguments to $_REQUEST



Many thanks for giving it a thought.


-- 
Edit bug report at http://bugs.php.net/?id=27239&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27239&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27239&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27239&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27239&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27239&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27239&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27239&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27239&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27239&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27239&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27239&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27239&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27239&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27239&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27239&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27239&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27239&r=float

Reply via email to