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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC