#20299 [Bgs]: On the command line, $argv/ $argc are not set
| From: | philip@php.net | Date: | Thu, 07 Nov 2002 20:24:11 +0000 |
| Subject: | #20299 [Bgs]: On the command line, $argv/ $argc are not set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24296@lists.php.net to get a copy of this message | ||
ID: 20299
Updated by: philip@php.net
Reported By: web@affenkrieger.de
Status: Bogus
Bug Type: Variables related
Operating System: WinNT SP6
PHP Version: 4.2.3
New Comment:
See also $_SERVER['argv'] and friends.
Previous Comments:
------------------------------------------------------------------------
[2002-11-07 09:25:52] cynic@php.net
pilot error -> bogus
------------------------------------------------------------------------
[2002-11-07 08:57:55] web@affenkrieger.de
bah - register_globals... damn im an idiot 8-)
------------------------------------------------------------------------
[2002-11-07 08:54:33] cynic@php.net
what is your register_argc_argv setting?
------------------------------------------------------------------------
[2002-11-07 08:54:32] wez@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.
------------------------------------------------------------------------
[2002-11-07 08:48:44] web@affenkrieger.de
this is the script 'test.php'
-----
<?php
print_r($argv);
?>
-----
when called via
c:\>php -f test.php test bla testagain
it should print:
------
Array
(
[0] => test.php
[1] => test
[2] => bla
[3] => testagain
)
-----
but nothing happens.
i used php 4.2.3 win32 binaries (zip) on a WinNT SP6 PC.
all other things seem to work.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/20299
--
Edit this bug report at http://bugs.php.net/?id=20299&edit=1