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
What does
which python
tell you, both from the command line and from shell_exec()? It should tell you which (if any) Python interpreter it's finding (from $PATH). Don't forget that it's quite possible that the $PATH used from the Linux command line might not be the same as the $PATH used by shell_exec()! Once you find the Python interpreter you want to use, you might have to hard code it in the shell_exec().