title: command works in the terminal, wont work in php
body: <p>I've made an extension for my web application in php. I want the php script to remake the extension, so I'm trying to send a command to the terminal. It looks like this:</p>
  
  <pre><code>shell_exec("make -C /folder1/folder2");
  </code></pre>
  
  <p>And it won't make the .so file no matter what. I've used <code>chmod 777</code> on that folder to make it editable but it didn't help. When I'm directly using the command in the terminal it works just fine:</p>
  
  <pre><code>make -C /folder1/folder2
  </code></pre>
  
  <p>The .so file gets created without a problem, functions from my extension work like they should. Does anyone have a solution for this?</p>