I am trying to get the status of gpio17 via php like that:
(Installed: Raspbian, Apache2, PHP5) This is what i do:
echo "17" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio17/direction echo "1" > /sys/class/gpio/gpio17/value
After setting the gpio i call the 'gpio_test.php' file in the browser. This is the gpio_test.php file:
<?php trim(@shell_exec("cat /sys/class/gpio/gpio17/value")); ?>
When I look into my apache2 log file it says:
"cat /sys/class/gpio/gpio17/value permission denied"
What can I do to fix this?