ID: 26206 Updated by: [EMAIL PROTECTED] Reported By: danielc at analysisandsolutions dot com -Status: Open +Status: Feedback Bug Type: CGI related Operating System: Windows 2000 PHP Version: 5CVS-2003-11-11 (dev) New Comment:
And you're absolutely sure you don't have ANY old PHP related dlls in your system before you installed the snapshot? (delete all php4ts.dll files..) Previous Comments: ------------------------------------------------------------------------ [2003-12-01 00:35:22] danielc at analysisandsolutions dot com No luck with the new snapshot. Downloaded php5-win32-200312010330.zip, copied php.ini-recommended to php.ini, turned register_argc_argv = On, ran the following... C:\PROGRA~1\php\cli>php -i | grep argv register_argc_argv => On => On C:\PROGRA~1\php\cli>php -r " var_dump($_SERVER['argv']); " 1 2 3 PHP Notice: Undefined index: argv in Command line code on line 1 NULL ------------------------------------------------------------------------ [2003-11-29 00:15:40] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip I can not reproduce this on windows using latest CVS snapshot. ------------------------------------------------------------------------ [2003-11-27 19:24:09] danielc at analysisandsolutions dot com 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) ------------------------------------------------------------------------ [2003-11-27 19:03:46] [EMAIL PROTECTED] 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