PHP 4.0 Bug #9434 Updated: Command line argument, that trates as QUERY_STRING, isn't proper.

From: Date: Thu, 15 Mar 2001 17:22:43 +0000
Subject: PHP 4.0 Bug #9434 Updated: Command line argument, that trates as QUERY_STRING, isn't proper.
Groups: php.dev 
Request: Send a blank email to php-dev+get-49003@lists.php.net to get a copy of this message
ID: 9434 User Update by: sagawa@sohgoh.net Old-Status: Open Status: Closed Bug Type: Feature/Change Request Description: Command line argument, that trates as QUERY_STRING, isn't proper. I withdraw this patch. Because, it turns out that this patch have a bad influence on argument variables. All argvs are connected to only argv[0], so we can't get argv[2] and so on. I am thankful to Mr.Hirokawa who pointed out this. Previous Comments: --------------------------------------------------------------------------- [2001-02-24 04:33:33] sagawa@sohgoh.net I get funny $HTTP_GET_VARS passed by command line argument query_string, on PHP 4.0.4(as far as I know :) with cgi-sapi. This is sample for this problem. test.php is <?php var_dump($HTTP_GET_VARS); ?> and run from command line. % php -f test.php 'AAA=xx&BB=yy' 'CC=zz' array(2) { ["test_php_AAA"]=> string(2) "xx" ["BB"]=> string(8) "yy CC=zz" } `AAA' is connected with file name, and inserted space between arguments. (test.php was changed to test_php because of php variable name restriction.) So, I modify sapi/cgi/cgi_main.c. % diff -u cgi_main.c~ cgi_main.c --- cgi_main.c~ Sun Dec 3 10:09:13 2000 +++ cgi_main.c Thu Feb 22 21:20:47 2001 @@ -649,14 +649,10 @@ s = malloc(len + 1); /* leak - but only for command line version, so ok */ *s = '

« previous php.dev (#49003) next »