Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Newbie: Beaglebone Black Apache cgi |
|
Author |
|
AndyBeagleBone
Joined: 09 Jun 2016 Posts: 1 Location: Lowestoft
|
Posted: Thu 09 Jun '16 21:49 Post subject: Newbie: Beaglebone Black Apache cgi |
|
|
Hi there,
I am using apache2 on my beaglebone black (rev c) debian whizzy).
I have written a simple c program to turn on and off the usr leds. I have stored this in a directory called /var/www/cgi-bin. The program runs fine from the command line, but fails to execute when I call it using a PHP exec('ledctl 0 0');
can you offer me any advice or examples?
Many Thanks
Andy |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 16 Jun '16 18:53 Post subject: |
|
|
make sure that the script is 0777 or the owner is the same that apache uses and use the full path.
e.g.
Code: | <?php
error_reporting(E_ALL);
ini_set('display_errors',1);
exec('/var/www/cgi-bin/ledctl 0 0');
|
|
|
Back to top |
|
|
|
|
|
|