|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13757 Commandline: querystring parser buggy
Submitted: 2001-10-19 11:05 UTC Modified: 2003-05-18 22:41 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tho at e-dict dot net Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 4.3.2RC3-dev OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tho at e-dict dot net
New email:
PHP Version: OS:


 [2001-10-19 11:05 UTC] tho at e-dict dot net
executable script /tmp/bug:
# ! /usr/local/bin/php -f
print "V1 = $V1\n";
print "V2 = $V2\n";

$  /tmp/bug "V1=val1&V2=val2"

V1 = 
V2 = val2
array(2) {
  string(4) "val1"
  string(4) "val2"

... see: the first array index is parsed to "/tmp/bug_V1". 
downwardcompatibility to PHP3 not given !


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-14 13:36 UTC]
PHP 4.1.0 does this also...
 [2002-06-06 05:41 UTC]
Can you try the CLI in 4.2.x or from the latest CVS? This might have been fixed.
 [2002-06-06 06:03 UTC]
Not CLI. CLI doesn't work that way anyway.

CGI does this:
$ cat test.php
#!/home/mfischer/php4/bin/php-cgi -f
        print "V1 = $V1\n";
        print "V2 = $V2\n";

$ ./test.php "V1=val1&V2=val2"
V1 = 
V2 = 
array(2) {
  string(4) "val1"
  string(4) "val2"

Admitted, looks wierd. PHP3 compatibility is of no concern here, anyway.

If no one tells me better I'ld expect V1 beingin HTTP_GET_VARS.
 [2002-06-26 09:37 UTC] Ingo dot Freund at e-dict dot net
in 4.2.1 still not fixed

the result remains the same

php doesn't take notice of the first argument
but it is visible in $HTTP_GET_VARS
 [2003-02-08 00:52 UTC]
fixed in 4.3.0

 [2003-05-07 05:52 UTC] tho at e-dict dot net
tho@dev0:~/test> php -i|grep "PHP Version"
PHP Version => 4.3.0

tho@dev0:~/test> ./test.php "V1=val1&V2=val2"
V1 = 
V2 = val2
array(2) {
  string(4) "val1"
  string(4) "val2"

Seems not to be fixed in 4.3.0. Please reopen bug.
 [2003-05-07 06:14 UTC] tho at e-dict dot net
bug verified, still there
 [2003-05-18 22:41 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

RC4 should have the fix
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 16 16:03:37 2021 UTC