apache run server side code via php
Hi,
I have a usb temperature stick called TEMPer. I am using a c program I found which returns the current air temperature. What I would like to do is call this binary code from a webpage.
I put the compiled code in /usr/bin and created the following file "index.php"
Code:
<?php
print("Current Temp:\n\n");
$thetemp = system('temper');
echo $thetemp;
?>
I only get "Current Temp:" on my page and an error in my /var/log/httpd/error_log:
"TemperCreate: Operation not permitted"
Where TemperCreate is a function in the original C code. I guess this is a good thing as it is stopping apache from running server side code.
So to my question. Is it possible to allow apache to run compiled C code ?
Safe mode is turned off and I have tried making apache the owner of the binary, still no joy.
Any suggestion would be great.
Thanks,
Pete.