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
I think you need to refer to the full path for your python.
for example use this instead:
$output = shell_exec("/usr/bin/python full_path/my_script.py")
instead of:
$output = shell_exec("python my_script.py");