More precisely, the variables in the script are not returned to the calling php script. Both scripts are executable by the world

First the call:
Code:
$CPUTemp = exec("/usr/local/sbin/supermon/get_temp");
print "   [ $CPUTemp]";
Now the bash script:

Code:
echo -n "CPU: "

CTEMP=$(/opt/vc/bin/vcgencmd measure_temp)
CTEMP=${CTEMP:5}
SAVE=$IFS; IFS="'"; set -- $CTEMP; IFS=$SAVE
CTEMP=$1; FTEMP=$(echo 9 '*' $CTEMP / 5 + 32 | /usr/bin/bc)

if [ "$FTEMP" -le "120" ]; then
echo -en "<span style=\"background-color: palegreen;\">"
elif [ "$FTEMP" -le "150" ]; then
echo -en "<span style=\"background-color: yellow;\">"
else
echo -en "<span style=\"font-weight: bold; color: yellow; background-color: red;\">"
fi

echo -en "&nbsp;${FTEMP}&deg;F, ${CTEMP}&deg;C </span>&nbsp; @ `date +%H:%M`&nbsp;"
CPUTemp.JPGCPUTemp.JPG
If called from command line:

root@myhost:~# /usr/local/sbin/supermon/get_temp
CPU: <span style="background-color: palegreen;">&nbsp;88&deg;F, 31.6&deg;C </span>&nbsp; @ 08:07&nbsp;

root@myhost:~#


The attachment shows what is displayed in browser