#26206 [Fbk->Opn]: argv and argc not defined
| From: | danielc at analysisandsolutions dot com | Date: | Fri, 28 Nov 2003 00:24:09 +0000 |
| Subject: | #26206 [Fbk->Opn]: argv and argc not defined | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-51188@lists.php.net to get a copy of this message | ||
ID: 26206
User updated by: danielc at analysisandsolutions dot com
Reported By: danielc at analysisandsolutions dot com
-Status: Feedback
+Status: Open
Bug Type: CGI related
Operating System: Windows 2000
PHP Version: 5CVS-2003-11-11 (dev)
New Comment:
Your test of ignoring the php.ini file via the -n flag gets it to work
as expected.
FYI...
C:\PROGRA~1\php\cli>php -i | grep argv
register_argc_argv => On => On
C:\PROGRA~1\php\cli>php -n -i | grep argv
register_argc_argv => On => On
_SERVER["argv"] => Array
C:\PROGRA~1\php\cli>php -v
PHP 5.0.0b3-dev (cli) (built: Nov 26 2003 04:10:19)
Previous Comments:
------------------------------------------------------------------------
[2003-11-27 19:03:46] iliaa@php.net
Try following:
php -n -r " var_dump($_SERVER['argv']); " 1 2 3
------------------------------------------------------------------------
[2003-11-11 12:52:32] danielc at analysisandsolutions dot com
Description:
------------
$_SERVER['argv'] and $_SERVER['argc'] aren't created.
php.ini and phpinfo() show register_argc_argv as being On.
Behavior is the same via CLI or CGI binaries.
Substituted a known good php.ini file to see ensure the file was
getting parsed. Same results.
Everything worked fine under 500b2-dev--php5-win32-200310010230
Problem began when upgraded to 500b2-dev--php5-win32-200311040330
Persists in the current CVS snapshot
500b3-dev--php5-win32-200311111530
Reproduce code:
---------------
#! c:/progra~1/php/cli/php
<?php
print_r($_SERVER['argv']);
?>
now execute test script...
./t.php fjiao
Expected result:
----------------
Array
(
[0] => ./t.php
[1] => fjiao
)
Actual result:
--------------
Notice: Undefined index: argv in d:\t.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26206&edit=1