I wrote a script that gets the crontab info, makes some changes, saves them in a temp file and updates crontab with it.
exec("crontab -l", $crontab);
<< make changes to $crontab array >>
<< write array to tempfile.txt >>
exec("crontab ".$filename);
It works beautifully on the command line and then completely fails when I try to run it from a webpage. Does anyone have any idea why that is?