ID:               27239
 Updated by:       [EMAIL PROTECTED]
 Reported By:      echo15 at delirium dot ch
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
-Operating System: Linux 2.4.20
+Operating System: *
-PHP Version:      4.3.4
+PHP Version:      4.3
 New Comment:

The example you gave relies on register_globals. and cli was
experimental in 4.2.


Previous Comments:
------------------------------------------------------------------------

[2004-02-13 08:05:22] echo15 at delirium dot ch

And... no, creating a real HTTP subrequest to the WWW server in the
example above does not always do the trick, specially not if the page
is password protected. You don't want to have plain passwords in the
PHP pages on the WAP server – and it's slower than using PHP CLI.

------------------------------------------------------------------------

[2004-02-13 07:58:55] echo15 at delirium dot ch

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."

------------------------------------------------------------------------

[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

Reply via email to