I am trying to call a php script through a shell script.The script is to be called as the run on receive directive of gammu-smsd.My php script executes as expected when I call it using
/opt/lampp/bin/php myvarsreader.php
.However on trying to run my script(From terminal):
#!/bin/sh
PROGRAM=/opt/lampp/bin/php myvarsreader.php
eval "$PROGRAM \"\${SMS_${i}_NUMBER}\" \"\${SMS_${i}_TEXT}\""
echo $?
echo "$PROGRAM \"\${SMS_${i}_NUMBER}\" \"\${SMS_${i}_TEXT}\"" >> ran1date
I get the following error message
./first.sh: 17: myvarsreader.php: not found
eval: 1: : Permission denied
127
myvarsreader.php permissions are:-rwxrwxrwx,so I don't understand the permission denied part.
I am running ubuntu 10