From:             
Operating system: Windows 2008 R2, IIS7
PHP version:      5.3.10
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:exec command running a powershell script cause pwershell's crash

Description:
------------
I've got a PHP script which execute a powershell script. I used PHP version
5.2.x and it is running on IIS 7, Windows server 2008R2. The php package is
installed by the web platform installer.

Everything worked fine until I migrate my server to PHP 5.3.10. With this
new version, the same command cause a powershell crash. Other person on a
french forum has confirm my issue. I think it's a php bug because the
operation run well on php 5.2 and not in 5.3.10.
The php script is quite simple, see test script

Test script:
---------------
$command = 'powershell -ExecutionPolicy Unrestricted -command "$cred =
New-Object System.Management.Automation.PSCredential -ArgumentList
@(\'administrator\',(ConvertTo-SecureString -String \'MyPassword\'
-AsPlainText -Force));Invoke-Command -credential $cred -computername
127.0.0.1 -scriptblock {& c:\temp\launch.ps1}" <NUL';

print($command);

print("<br/><hr><br/>");

exec($command, $out);

print_r($out);


Expected result:
----------------
the script execute successful (which is the case on php 5.2.17)

Actual result:
--------------
powershell return an error on Invoke-Command. I should clarify on thing:
other scripts with other commands are running well, it's the invoke-command
that is not possible to run with this version of php.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=61741&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61741&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61741&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61741&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61741&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61741&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61741&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61741&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61741&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61741&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61741&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61741&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61741&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61741&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61741&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61741&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61741&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61741&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61741&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61741&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61741&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61741&r=mysqlcfg

Reply via email to