Can not execute php file in my asterisk system

I have setup a IVR system and use php script to connect my DB. But when I begin to use it prompt me
"Failed to execute ‘/var/lib/asterisk/agi-bin/ccs_connect.php’: No such file or directory "
But the file is really exist. How can I resolve the problem?

Change the file permissions to 755 and make sure you have “#!/usr/bin/php -q” on your first line, or whatever is your path to php binary.

Were you able to execute your php scripts ?
I’m in a similar situation, so I’m interested to know the answer.

check your php path…

/usr/bin or /usr/local