|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20299 On the command line, $argv/ $argc are not set
Submitted: 2002-11-07 08:28 UTC Modified: 2002-11-07 14:24 UTC
From: web at affenkrieger dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.3 OS: WinNT SP6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: web at affenkrieger dot de
New email:
PHP Version: OS:


 [2002-11-07 08:28 UTC] web at affenkrieger dot de
Using php on the command line, the variables $argv and $argc are not set even when arguments are present. I used the newest win32 zip package from But it worked on a linux system ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-07 08:36 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-11-07 08:48 UTC] web at affenkrieger dot de
this is the script 'test.php'

when called via
c:\>php -f test.php test bla testagain

it should print:
    [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.
 [2002-11-07 08:54 UTC]
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See 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:54 UTC]
what is your register_argc_argv setting?

 [2002-11-07 08:57 UTC] web at affenkrieger dot de
bah - register_globals... damn im an idiot 8-)
 [2002-11-07 09:25 UTC]
pilot error -> bogus

 [2002-11-07 14:24 UTC]
See also $_SERVER['argv'] and friends.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 02:01:29 2024 UTC