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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.