I have the following piece of code:
echo $k;
if ($k==9)
{$sql = "SELECT EventName,ACName,username FROM acslots WHERE slot".$i." ='9'";
$result = $con->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<br> To aircondition ". $row["ACName"]. " leitourgei gia ton xrhsth ". $row["username"]. " gia to event " . $row["EventName"] . "<br>";
}}
$command = escapeshellcmd("usr/bin/python /var/www/family_guy/codecall/openACled.py");
$output = shell_exec($command);
echo $output;
}
else {##apenergopoihsh led
$command = escapeshellcmd('usr/bin/python /var/www/family_guy/codecall/closeAcled.py');
$output = shell_exec($command);
echo $output;}
?> Let's say $k right now is 9. /var/www/family_guy/codecall/openACled.py is supposed to open a LED, however it doesn't work. I find that permissions in /var/www/family_guy/codecall/openACled.py are -rwsrwxr-x by using ls-ltr.Please help me.