When i call a shell script via a php script all the commands inside the shell script doesn't execute correctly (in my case the chmod, cp commands doesn't work properly) this happens when call to the php script is made via web browser, whereas when the same php script is called through command prompt all the shell script commands executes perfectly
PHP script Code below.
$output = exec ('bash auto_install.sh '.escapeshellarg($v1).' '.escapeshellarg($v2));
Shell script code below.
cp -R /Users/developer/Sites/master /Users/developer/Sites/$1
chmod -R 777 /Users/developer/Sites/$1
php /Users/developer/Sites/$1/install.php mysql localhost $1 root pulkit $1 admin $2 localhost/~developer/$1 create 1
Thanks in advance