First I tried other questions that may lead to an answer but failed. Anyway I have a problem executing a php script from a bash script and outputs the following error message: Could not open input file: /root/dir/file.php
, I can execute the php script fine from terminal however I tried using the 2 following codes in the shell script to execute the php script:
wordpress="/etc/alternatives/php /root/dir"
$wordpress/file.php $input
and
php /root/dir/file.php
and they both failed, any help appreciated.