I\'m experiencing a weird problem in trying to execute python in a php server (LAMP). (safe_mode off)
if I type:
$output = shell_exec(\"ls -lah\"); e
If you are trying to run the python script using the following code
$output = shell_exec("python my_script.py");
you will need to use absolute path for my_script.py and give all permissions (I am not sure which ones are sufficient) for the python file.