title: setting crontab is not working but crontab -l does via PHP file
body: <p>I want to set a cron job using PHP file, but don't know where the problem is coming in my process.</p>
  
  <p>When I wrote below (in PHP file and executed it on browser), it shows me the result. (It lists all cron jobs) </p>
  
  <pre><code>echo shell_exec('crontab -l');
  </code></pre>
  
  <p>But when I wrote below line, then it didn't set any cron job:</p>
  
  <pre><code>echo shell_exec('crontab /home/testsite/public_html/crons/crons.txt');
  </code></pre>
  
  <p>But If I run the same command (<strong>crontab /home/testsite/public_html/crons/crons.txt</strong>) via puTTY on my CentOS Dedicated Server, then it updates the crons list from crons.txt file.</p>
  
  <p>I also tried passing <strong>-u</strong> as I saw on several stackoverflow questions: </p>
  
  <pre><code>echo shell_exec('crontab -u testsite /home/testsite/public_html/crons/crons.txt');
  </code></pre>
  
  <p>Can anyone help?</p>