#19444 [NEW]: argv is parsed differently when script is run via shebang vs run via php -f
| From: | yoglets at hotmail dot com | Date: | Tue, 17 Sep 2002 00:44:06 +0000 |
| Subject: | #19444 [NEW]: argv is parsed differently when script is run via shebang vs run via php -f | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-19503@lists.php.net to get a copy of this message | ||
From: yoglets@hotmail.com
Operating system: RedHat 7.3
PHP version: 4.2.3
PHP Bug Type: Scripting Engine problem
Bug description: argv is parsed differently when script is run via shebang vs run via php -f
Given the script:
<? print_r($_SERVER['argv']); ?>
When run via a shebang within the file:
% test.php --a=1 --b=2 --c=3
Array
(
[0] => ./test.php
[1] => --a=1
[2] => --b=2
[3] => --c=3
)
Ok, that's good. Now, running the same script by calling the PHP binary
directly:
% php -f test.php --a=1 --b=2 --c=3
Array
(
[0] => test.php
[1] => --b=2
[2] => --c=3
)
Hey, where's my --a=1? I get these same results with 4.2.2 CGI, 4.2.3 CGI,
and 4.2.3 CLI.
--
Edit bug report at http://bugs.php.net/?id=19444&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19444&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19444&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19444&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19444&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19444&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19444&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19444&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19444&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19444&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19444&r=globals