Okay, happy to accept down votes to get to the bottom of my problem. I am brand new to Linux but have hosted my PHP based site on a Linux cloud server and need to run a FFMPEG script to convert a video. Under windows I have the full application working but under Linux I can't seem to get a basic script working and was wondering if someone can point me in the right direction. I have read the myriad posts on this, for example, Run bash Command from PHP but it does not help me get to the bottom of it.
Here is what I have so far.
$old_path = getcwd();
$new_path = getcwd();
echo('newpath '.$new_path); <-- this outputs 'old_path/videos'
echo ($temp) <-- produces nothing
echo "hello world"
In shell script must write and the interpretator.
Try this: shell_exec('php ./testScript.sh');
Edit: change php with correct interpretator (bash, sh...)