php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13990 Command line Input Problems with '+'
Submitted: 2001-11-08 10:12 UTC Modified: 2002-04-10 19:29 UTC
From: mo at schlund dot de Assigned:
Status: Closed Package: Strings related
PHP Version: 4.1.0RC1 OS: GNU/Linux Debian SID
Private report: No CVE-ID: None
 [2001-11-08 10:12 UTC] mo at schlund dot de
I use Debian/SIDs standard php4 as of 08/11/2001

Here is the Script to reproduce the Problem:

<?
    var_dump($argv);
?>

When I call the script like this:

nsn@nsn:~ > php4 -q test.php a+b

var_dump tells me I gave the Script 2 Parameters (a and b)
Actually I gave it 1 Parameter ('a+b').

I think PHP url-decodes the argvs before interpretion, but when I call the Script like this:

nsn@nsn:~ > php4 -q test.php a%2bb (with %2b being the url-endoded String for +) PHP does not url-decode the String properly.

As it seems it is not possible to send a string containing the character '+' to PHP on the command line.

please excuse my rather bad english

regards
      Michael Bayer [mo@schlund.de]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-09 12:16 UTC] sander@php.net
Dupe of #12219
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC