note 110617 deleted from function.exec by cmb
| From: | cmb@php.net | Date: | Sun, 24 Nov 2019 08:53:12 +0000 |
| Subject: | note 110617 deleted from function.exec by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213211@lists.php.net to get a copy of this message | ||
Note Submitter: Matthias Marx
----
I had a script calling a powershell script in one function. It worked fine on XP but when we moved
to Windows 7 it stopped working. The script seemed to hang and expect a carriage return before it
continued.
Adding "echo . |" before calling powershell gave it the desired carriage return:
<?php
exec ( "powershell.exe someScript.ps1" ); // hangs
exec ( "echo . | powershell.exe someScript.ps1 " ); // works
?>