#42194 [Opn->Tbd]: $argc/$argv[] won't work when .php extension is assigned to php.exe
| From: | rquadling@php.net | Date: | Tue, 28 Jul 2009 09:40:12 +0000 |
| Subject: | #42194 [Opn->Tbd]: $argc/$argv[] won't work when .php extension is assigned to php.exe | ||
| References: | 1 | Groups: | php.bugs php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2565@lists.php.net to get a copy of this message | ||
ID: 42194
Updated by: rquadling@php.net
Reported By: backbone46 at gmail dot com
-Status: Open
+Status: To be documented
Bug Type: Scripting Engine problem
Operating System: Windows XP
PHP Version: 6CVS-2007-08-03 (CVS)
New Comment:
You have to tell windows that multiple parameters are allowed.
By associating in the way that you've done, you are only going to be
getting the script name assigned to the interpreter.
The registry needs amending so that the handler's Run command looks
more
like ...
"C:\PHP5\PHP.EXE" "%1" %*
So, the script name is supplied in quotes (allowing script path or file
name to have spaces) followed by all the other parameters.
Previous Comments:
------------------------------------------------------------------------
[2007-08-03 04:36:21] backbone46 at gmail dot com
Description:
------------
I did a right-click->open-with->chose-program->browsed to php.exe
Checked the "Always use the selected program to open this kind of file"
OK
So launched the following line in the console
C:\>script.php 1arg 2arg 3arg
Reproduce code:
---------------
<?php
echo "\nArguments:$argc\n";
?>
Expected result:
----------------
Arguments:4
Actual result:
--------------
Arguments:1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42194&edit=1