[beagleboard] Call a C program from PHP

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


BTW: did you check

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:

  1. 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.
  2. Your php server, taking user input from the web, and modifying the user-space files as required.