This is the code and it's purpose is to run a bash script. (index.php)
<html>
<title>
hello
</title>
<b>hello</b>
<body>
<?php
exec('bash /var/www/html/test.sh');
?>
</body>
</html>
when do php index.php it will execute the test.sh but when I run it with browser it wont run the bash script.
consider that index.php is in the same directory of test.sh i've done chmod and chown.
this is the test.sh
#!/bin/bash
python3 /var/www/html/test.py
and this is the test.py
import logging
a = "Hello world "
LOG_FILENAME = '/var/www/html/test.txt'
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
logging.debug(a)