Hi
Apache in debian runs as user www-data. Has the user www-data the rights to run
1. your program
2. access gpio
You may test this if you su www-data, having no password:
su # become root
su www-data # become user www-data
bash # as www-data has no shell
/var/www/ledCtl $led $onOff
HTH
BTW: did you check
/var/log/apache2/error.log
A left-field option would be to communicate with a script running with full privileges via a couple of user-space files.
This way you’d have:
- A script run at startup, which looks for certain values in a couple of user-space files - possibly files within your server folder. The script then uses these values to determine what programs to run, files to modify, etc.
- Your php server, taking user input from the web, and modifying the user-space files as required.
Cheers,
Andy.