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. Cheers, Andy. On Thursday, 10 December 2015 05:23:40 UTC+13, Dieter Wirz wrote: > > BTW: did you check > /var/log/apache2/error.log > > > On Wed, Dec 9, 2015 at 4:55 PM, Dieter Wirz <[email protected] > <javascript:>> wrote: > > 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 > > > > > > On Tue, Dec 8, 2015 at 8:02 PM, Marcelo Rodrigues <[email protected] > <javascript:>> wrote: > >> Hi Everyone, > >> > >> I wrote a small C program for turning on/off the LEDs of the > BeagleBone, it > >> works fine when I call it direct from command line. However, when I try > to > >> call it from a PHP code it doesn't work. > >> > >> I'm using Linux beaglebone 3.8.13-bone71.1 and Apache2. The C program > reads > >> 2 arguments from command line (led and onOff) that says which led to > control > >> and its state. The exec line in the PHP code is the following: > >> exec("/var/www/ledCtl $led $onOff"); > >> > >> Do you have any idea how can I find the reason this call doen'st work > from > >> PHP code? > >> > >> Thanks in advance. > >> > >> -- > >> For more options, visit http://beagleboard.org/discuss > >> --- > >> You received this message because you are subscribed to the Google > Groups > >> "BeagleBoard" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to [email protected] <javascript:>. > >> For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
