php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4112 Command line argument processing broken
Submitted: 2000-04-11 22:56 UTC Modified: 2005-03-31 16:13 UTC
From: viola at debonet dot com Assigned:
Status: Wont fix Package: Other
PHP Version: 3.0.16 OS: Linux Redhat 6.1
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: viola at debonet dot com
New email:
PHP Version: OS:

 

 [2000-04-11 22:56 UTC] viola at debonet dot com
First of all this is a bug in PHP/4.0RC1.

I wrote a very simple php "script" to look at the command
line args passed --  args.php.

#!/usr/local/bin/php -q
<?php
echo "$argc\n";
for ($i = 0; $i < $argc ; $i++) {
  echo "$i {$argv[$i]}\n";
}
?>

I then called :
> ./args.php "http://foo.com/one?bar=++10&baz=100"
4
0 ./args.php
1 http://foo.com/one?bar=
2 
3 10&baz=100


Notice that even though the arg is quoted,  the +'s seem
to split the single arg into 3.  

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 14:01:26 2019 UTC