 <p>exec() could have been disabled by the server admin. In this scenario a call to exec would print an E_NOTICE and a E_WARNING. So if you disabled warning printing you can only see the E_NOTICE and potentially miss the more interesting warning saying "exec has been disabled for security reason".</p> <p>You can add this line to your code</p> <pre><code>error_reporting(E_ALL); </code></pre> <p>so that you can have a more verbose execution.</p>