title: exec('curl url') function not working from php (Laravel) application
body: <p>I am using Laravel 5 for our development.</p>
  
  <p>I have such structure:</p>
  
  <ul>
  <li>trigger page <a href="http://localhost/some/random/url" rel="nofollow noreferrer">http://localhost/some/random/url</a>:</li>
  </ul>
  
  <p>code inside:</p>
  
  <pre><code>exec("curl http://localhost/public/action/test");
  </code></pre>
  
  <ul>
  <li><p><a href="http://localhost/action/" rel="nofollow noreferrer">http://localhost/action/</a>{param} page:</p>
  
  <p>code inside:</p>
  
  <p><code>$rand = rand(1, 5); 
  sleep($rand); 
  Storage::append('result.txt', 'Time: ' . time() . '; Rand: ' . $rand . "; RowId: " . $id); 
  return 'Time: ' . time() . '; Rand: ' . $rand . "; RowId: " . $id;</code></p></li>
  </ul>
  
  <p>if I run this command in cmd <code>curl http://localhost/public/action/test</code>, everything works fine, result.txt file is created and I got response from return statement. If I try to run from application with exec() from <a href="http://localhost/some/random/url" rel="nofollow noreferrer">http://localhost/some/random/url</a>, seems "action/{param} page" is not executing at all.</p>
  
  <p>P.S.
  Why I am not using <code>curl_exec()</code>, because I try to make something similar to multi threading, because as I know that <code>exec()</code> executes in another process, but <code>curl_exec()</code> not. </p>
  
  <p>P.S.S.
  Why I am not using pthread library, because it not possible to switch our project to 7.2 php version.</p>