From:             winfried dot pohl at pohl-it dot de
Operating system: Windows 2000/2003
PHP version:      5CVS-2006-06-22 (snap)
PHP Bug Type:     CGI related
Bug description:  incorrect handling of double quotes in argv parameters

Description:
------------
php incorrectly handles doubled doublequotes in commandline parameters
which are either ignored or result in messed up argv-array

Reproduce code:
---------------
## test.php
<?
print_r($argv);
?>

## commandline 1
php test.php """param1_1""param1_2" "param2" "param3"

## commandline 2
php test.php """param1_1""param1_2" "param2" ""


Expected result:
----------------
Array (
  [0] => test.php
  [1] => "param1_1"param1_2
  [2] => param2
  [3] => param3
)

Array (
  [0] => test.php
  [1] => "param1_1"param1_2
  [2] => param2
  [3] => 
)

Actual result:
--------------
Array (
  [0] => test.php
  [1] => "param1_1param1_2 param2 param3
)

Array (
  [0] => test.php
  [1] => "param1_1param1_2 param2 "
)

-- 
Edit bug report at http://bugs.php.net/?id=37883&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37883&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37883&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37883&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37883&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37883&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37883&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37883&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37883&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37883&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37883&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37883&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37883&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37883&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37883&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37883&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37883&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37883&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37883&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37883&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37883&r=mysqlcfg

Reply via email to