note 110617 added to function.exec

From: Date: Tue, 13 Nov 2012 21:46:23 +0000
Subject: note 110617 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-191912@lists.php.net to get a copy of this message
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 ?> ---- Server IP: 69.147.83.199 Probable Submitter: 38.112.112.254 ---- Manual Page -- http://www.php.net/manual/en/function.exec.php Edit -- https://master.php.net/note/edit/110617 Del: integrated -- https://master.php.net/note/delete/110617/integrated Del: useless -- https://master.php.net/note/delete/110617/useless Del: bad code -- https://master.php.net/note/delete/110617/bad+code Del: spam -- https://master.php.net/note/delete/110617/spam Del: non-english -- https://master.php.net/note/delete/110617/non-english Del: in docs -- https://master.php.net/note/delete/110617/in+docs Del: other reasons-- https://master.php.net/note/delete/110617 Reject -- https://master.php.net/note/reject/110617 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191912) next »