I'm a sys admin as well as web developer at my job. I have a php program that prompts the user for a number of parameters which then using those parameters must execute a batch shell script. I've got this functioning using:
$cmd = "echo \"podcast -c $TCname\" | at $_stimehr:$_stimemn $_sdate"; exec("$cmd", $_RetVal);
This gets queued and even runs. But I believe I have a permissions issue that I can't seem to conquer.
My apache2 runs as user www-data and I've made sure that the shell script is executable by everyone and also my working directory tree currently set to 777 (temporarily until I figure this out). And it still starts then fails without any error messages and I've got logging on to the wazoo! No errors. It appears to stop when trying to change directories.
Hopefully some other *nix guru who may have run into this before will have a simple answer as I've be struggling and doing trial and error for a couple of months on and off now.