php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27556 argc not working correctly
Submitted: 2004-03-10 19:02 UTC Modified: 2004-03-18 17:26 UTC
From: stan at workflowinc dot com Assigned:
Status: No Feedback Package: CGI/CLI related
PHP Version: 4CVS-2004-03-11 (dev) OS: Windows XP
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stan at workflowinc dot com
New email:
PHP Version: OS:

 

 [2004-03-10 19:02 UTC] stan at workflowinc dot com
Description:
------------
$_SERVER['argv'] is not detecting any arguments (register_argc_argv in php.ini is turned on).  I'm actually working with 4.3.5RC4-dev, it wasn't on the list.

Reproduce code:
---------------
<?php
print_r($_SERVER['argv']);
exit;
?>


Expected result:
----------------
Array
(
      [0] => test.php
      [1] => arg1
)


Actual result:
--------------
Array
(
      [0] => test.php
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-10 19:44 UTC] sniper@php.net
Works fine for me. How exactly are you running the script?
And are you using CLI or CGI?

 [2004-03-11 04:19 UTC] stan at workflowinc dot com
I simply ran test.php arg1 from the command line interface.
 [2004-03-11 08:39 UTC] iliaa@php.net
Is $_SERVER array populated (has any values) ? 
 [2004-03-11 08:51 UTC] stan at workflowinc dot com
$_SERVER is populated (by the way argc => 1)
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 15:03:14 2021 UTC