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 this may help...
looks like the output for the python call needs to be routed properly. I was able to make this work within my index.php file for returning the python version...
shell_exec("python -V 2>&1");
Here is where I found the answer.