When I run vcgencmd measure_temp
in the terminal, it gives the temperature reading of the cpu.
But when i use the same command in php exec('vcgencmd measure_temp 2>&1')
it gives following error in the browser:
VCHI initialization failed
How can vcgencmd
command be executed from php?