|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27834 $_SERVER['argv'] not available without register_argc_argv
Submitted: 2004-04-02 02:41 UTC Modified: 2004-04-08 11:42 UTC
From: dwalton at acm dot org Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.0.0RC1 OS: FreeBSD 4.8-STABLE
Private report: No CVE-ID: None
 [2004-04-02 02:41 UTC] dwalton at acm dot org
According to the command line docs

"Regardless of version or register_globals setting, you can always go through either $_SERVER or $HTTP_SERVER_VARS. Example: $_SERVER['argv']"

This appears to not be the case.  While attempting to use $_SERVER['argc'] and $_SERVER['argv'] with the CGI version of 5.0RC1 with register_globals turned off, I discovered they were not being set.  However, they do appear when I turn on register_argc_argv (which is only supposed to control $argc and $argv).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-07 04:34 UTC]
Please try using this CVS snapshot:
For Windows:

Works fine for me..

 [2004-04-07 17:31 UTC] dwalton at acm dot org
I just tried php5-200404072030.  $_SERVER['argc'] and $_SERVER['argv'] are still being controlled by register_argc_argv.
 [2004-04-08 11:42 UTC]
Try the CLI version. (CGI != CLI, the manual page you refer to is about CLI..)

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 12:01:26 2023 UTC