php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12219 Command Line Arguments not being passed correctly
Submitted: 2001-07-17 20:31 UTC Modified: 2002-01-19 19:02 UTC
From: procacci at procacci dot net Assigned:
Status: Closed Package: URL related
PHP Version: 4.0.5 OS: Redhat 7.0
Private report: No CVE-ID: None
 [2001-07-17 20:31 UTC] procacci at procacci dot net
./grab_meta http://altavista.com/sites/search/web?q=task+management&pg=q&kl=XX 3

The following command line argument doesn't work because of the plus sign (+).  This also hold true when the second argument is enclosed in qutoes (") || (').
The plus sign (+) causes the second argument to split up into two smaller arguments.  BUG?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-17 22:33 UTC] zak@php.net
This is not a bug.
Review http://www.php.net/manual/en/language.variables.external.php
 [2001-07-18 10:21 UTC] cynic@php.net
Zak, IIRC this _is_ a bug, or at least a misfeature. the TODO file says:

    * when used in standalone (skell-script like) mode don't urldecode
      arguments passed to php. right now it's not possible to say
        /usr/local/bin/php somescript.php dog+cat.txt
      as "dog+cat.txt" will arrive in php as "dog cat.txt". 

BTW, AFAICT the manual page you linked here contains _nothing_ about this particular issue (I even read all the notes on the page).

 [2001-07-18 11:37 UTC] zak@php.net
Ack! What was I doing? :) Thanks for catching this!


 [2002-01-19 19:02 UTC] edink@php.net
This issue is resolved by inclussion of
cli sapi in the current cvs. You can download the
latest cvs snapshot from http://snaps.php.net/php4-latest.tar.gz.

The new cli interpreter is built in $srcdir/sapi/cli.
make install will install it in $bindir/php
(/usr/local/bin/php by default).
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 16:03:36 2021 UTC