I want to execute a python script using php shell_exec.
This is my code:
- Code: Select all
shell_exec("/opt/lampp/htdocs/news/hello.py 2>1 &");
When i run it from the browser i get this error:
- Code: Select all
/usr/bin/python: /opt/lampp/lib/libz.so.1: no version information available (required by /usr/bin/python)
If i run it from the terminal window using this: php /opt/lampp/htdocs/page/index.php it works without any problems.
So any ideas how can i make it work from the browser?
Thanks!