I'm trying to run a python script through php, but it does not run python.
I used the code to test:
$cmdResult = shell_exec("ls & /usr/local/bin/python2.7 --version & echo done");
Returned:
done
LICENSE
example.py
When I type directly via shell:
[root@local folder]# /usr/local/bin/python2.7 --version
Python 2.7.6
Does anyone have any ideas?
Additional Info:
[root@local folder]# ls -all /usr/local/bin/py*
-rwxr-xr-x 1 root apache 84 Jul 21 21:53 /usr/local/bin/pydoc
lrwxrwxrwx 1 root root 24 Jul 21 21:43 /usr/local/bin/python -> /usr/local/bin/python2.7
-rwxrwxrwx 1 root apache 4669791 Jul 21 21:53 /usr/local/bin/python2.7
-rwxr-xr-x 1 root apache 1674 Jul 21 21:53 /usr/local/bin/python2.7-config