I'm running the following exec method in php.
exec("exec /bin/bash ./test.sh $file $fileY 2>&1", $output, $return);
However when I print out the $return variable I get 1 as a result which is an error code.
How do I diagnose this to find out why this error code is appearing, I've tried a number of different methods to figure it out like setting permissions for everything to 077 but none of it is working.
Can anyone advise me on what to do?
/bin/bash ./test.sh $file $fileY 2>&1 && echo $??&& echo $?to the end of the first parameter of the exec method?