logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: Newbie: Beaglebone Black Apache cgi
Author
AndyBeagleBone



Joined: 09 Jun 2016
Posts: 1
Location: Lowestoft

PostPosted: Thu 09 Jun '16 21:49    Post subject: Newbie: Beaglebone Black Apache cgi Reply with quote

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

PostPosted: Thu 16 Jun '16 18:53    Post subject: Reply with quote

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


Reply to topic   Topic: Newbie: Beaglebone Black Apache cgi View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner