ID: 27239 User updated by: echo15 at delirium dot ch Reported By: echo15 at delirium dot ch Status: Open Bug Type: Feature/Change Request Operating System: Linux 2.4.20 PHP Version: 4.3.4 New Comment:
Oops, near the end of the feature request, I wrote: "... to allow passing the arguments to $_POST or $_GET instead of $argv." Yet what I ment was: "... to allow passing the arguments to $_REQUEST instead of $argv." Previous Comments: ------------------------------------------------------------------------ [2004-02-13 07:55:50] echo15 at delirium dot ch 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 this bug report at http://bugs.php.net/?id=27239&edit=1