ID:               35961
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rquadling at gmail dot com
-Status:           Bogus
+Status:           Assigned
 Bug Type:         CGI related
 Operating System: Windows XP SP2
 PHP Version:      5.1.1
-Assigned To:      
+Assigned To:      pierre
 New Comment:

[11:11] <Pierre>        RichardQ, assign these bugs to me and I will dispatch
them if necessary


Previous Comments:
------------------------------------------------------------------------

[2006-01-10 14:00:14] rquadling at gmail dot com

Well, doesn't that just suck!

------------------------------------------------------------------------

[2006-01-10 13:49:41] [EMAIL PROTECTED]

Not PHP problem.
See bug #25361.

------------------------------------------------------------------------

[2006-01-10 12:58:41] rquadling at gmail dot com

Description:
------------
Within windows CMD32, the following works (obviously you will need to
have a Windows system with Internet Explorer installed).

"C:\Program Files\Internet Explorer\IEXPLORE.EXE"

Will load Internet Explorer.

In PHP run from the CLI ...

<?php
$sOutput = shell_exec('"C:\Program Files\Internet
Explorer\IEXPLORE.EXE"');
?>

Will load Internet Explorer and wait until it is closed.

If you want to pass the program a parameter then you would wrap the
parameter with double quotes.

e.g.

>From the command line ...

"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
"http://www.google.com";

Will load Internet Explorer and place you at Google.

If you try the same sort of thing in PHP ...

<?php
$sOutput = shell_exec('"C:\Program Files\Internet
Explorer\IEXPLORE.EXE" "http://www.google.com";');
?>

You get an error of ...

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.



Reproduce code:
---------------
<?php
$sOutput = shell_exec('"C:\Program Files\Internet
Explorer\IEXPLORE.EXE" "http://www.google.com";');
?>

Expected result:
----------------
Internet Explorer loads with the Google page being displayed.

Actual result:
--------------
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35961&edit=1

Reply via email to