If you find your apache web service is unable to run the raspistill command you may need to modify the www-data apache user to allow it to run the command:
echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules
and this one
usermod -a -G video www-data
manpreet
Best Answer
2 years ago
I have been attempting to use RaspiStill in PHP for a number of days now. I have searched around and have been unable to come up with a solution.
I have been attempting to use
shell_exec()
in my php file like so:Which works if you use it from the console and type:
At first I was getting this error when running the php script in the browser:
This was resolved by updating
/etc/sudoers
with:I also added this line:
No error is returned in the apache logs so I am not sure what else to try.