Jump to content

PHP Warning: exec() has been disabled Alternative?


techker

Recommended Posts

Hey guy's i doing a Rasperry Pi garage door app and got this code in a tutorial:

 

$q=$_GET["q"];
 
if(isset($_GET['q']) && $_GET['q'] == 1) {
error_reporting(E_ALL);
exec('gpio write 7 0');
usleep(1000000);
exec('gpio write 7 1');
echo" garage is Open";
 
i modified it to return a response.
 
but i get an error file from server
 
PHP Warning:  exec() has been disabled for security reasons in /home/techker/public_html/Garage/getcd.php on line 15
 
is there an alternative or way around this ?
Link to comment
Share on other sites

i don't think i have access...

 

Then you may be out of luck.

 

The PHP manual gives you a collection of functions which can be used as an alternative to system(), but it's hard to imagine that they've disabled system() while keeping equivalent functions enabled. This wouldn't make any sense.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.