<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Multiple Command Line Calls with Shell Exec]]></title><description><![CDATA[<p dir="auto">I have a php site that takes in user fields and creates a json file. I then use a shell_exec call the templater powershell file with the following statement:</p>
<p dir="auto">shell_exec(‘powershell -File C:\render\templater.ps1 -v “CC 2017” -m’);</p>
<p dir="auto">However, when more than one person submits the form and a video is rendering the second call doesn’t work?</p>
<p dir="auto">Do you know why this would be? I have included the -m tag as well.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forums.dataclay.com/topic/27/multiple-command-line-calls-with-shell-exec</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 19:34:20 GMT</lastBuildDate><atom:link href="https://forums.dataclay.com/topic/27.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 05 Jun 2017 02:15:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Multiple Command Line Calls with Shell Exec on Fri, 23 Jun 2017 12:21:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wst-shorty">@<bdi>wst-shorty</bdi></a> You’re welcome!  Thanks for following up and letting us know.</p>
]]></description><link>https://forums.dataclay.com/post/38</link><guid isPermaLink="true">https://forums.dataclay.com/post/38</guid><dc:creator><![CDATA[ariestav]]></dc:creator><pubDate>Fri, 23 Jun 2017 12:21:16 GMT</pubDate></item><item><title><![CDATA[Reply to Multiple Command Line Calls with Shell Exec on Fri, 23 Jun 2017 09:56:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ariestav">@<bdi>ariestav</bdi></a> Yeah it seemed to have some weird conflict with PHP and windows running concurrently (its to do with how threading is coded). PsExec helped solve this though. Thanks very much!</p>
]]></description><link>https://forums.dataclay.com/post/37</link><guid isPermaLink="true">https://forums.dataclay.com/post/37</guid><dc:creator><![CDATA[wst-shorty]]></dc:creator><pubDate>Fri, 23 Jun 2017 09:56:09 GMT</pubDate></item><item><title><![CDATA[Reply to Multiple Command Line Calls with Shell Exec on Fri, 09 Jun 2017 05:09:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wst-shorty">@<bdi>wst-shorty</bdi></a> Hi There, and thanks for writing into the forums.  I think the answer is that you need to run the Powershell launcher as a child or forked process in PHP.  I’m not certain how to acheive this in PHP, but there are frameworks for handling child processes in PHP.  See the following:</p>
<p dir="auto"><a href="https://github.com/asyncphp/doorman" rel="nofollow ugc">https://github.com/asyncphp/doorman</a></p>
<p dir="auto"><a href="https://icicle.io/" rel="nofollow ugc">https://icicle.io/</a></p>
<p dir="auto"><a href="https://github.com/reactphp/child-process" rel="nofollow ugc">https://github.com/reactphp/child-process</a></p>
<p dir="auto">Have you tried using PHP’s exec() instead of shell_exec():</p>
<p dir="auto"><a href="http://php.net/manual/en/function.exec.php" rel="nofollow ugc">http://php.net/manual/en/function.exec.php</a></p>
<p dir="auto">You essentially need to make sure that PHP runs your command as a child process.  On Windows, we’ve had success using SysInternals PsExec to run multiple instances of AfterFX.exe from an exec() command.  Even though PsExec is intended for launching apps on remote machines, you can still use it to launch an app on the local machine.</p>
<p dir="auto"><a href="https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx" rel="nofollow ugc">https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx</a></p>
<p dir="auto">Please let me know if this helps in any way, it would be great to learn of your findings.</p>
<p dir="auto">Best,<br />
Arie</p>
]]></description><link>https://forums.dataclay.com/post/35</link><guid isPermaLink="true">https://forums.dataclay.com/post/35</guid><dc:creator><![CDATA[ariestav]]></dc:creator><pubDate>Fri, 09 Jun 2017 05:09:56 GMT</pubDate></item></channel></rss>